(navigation image)
Home American Libraries | Canadian Libraries | Universal Library | Community Texts | Project Gutenberg | Children's Library | Biodiversity Heritage Library | Additional Collections
Search: Advanced Search
Anonymous User (login or join us)
Upload
See other formats

Full text of "Sync Magazine Volume 2 Number 6"

The Magazine for Sinclair users and Timex/Sinclair users 



$2.95 (USA) 
£1.50 (UK) 





November/December 1982 



Volume 2, Number 6 



THEME SECTION: 

SYNC AT THE DRAWING BOARD 

4x4 Letters 
Line Drawing 
Curve Plotting 

PROGRAMMING TECHNIQUES: 
Line Print Utility 
Translating 4K to 8K 



MACHINE LANGUAGE 
Variables Transfer 
Keyboard Scanning 



HARDWARE: 

A Remote Terminal 




GAMES: 
Random Walks 
Keygame 



ROM-PAC APPLICATIONS HAS 

PROGRAMS ON PLUG-ON ROM 

CARTRIDGES FOR THE ZX-81 

'EDUCATIONAL PROGRAMS 
'APPLICATIONS 









'GAMES 



Call or Write For Your 



Information Package Including: 

*Current list of products and prices 

'Operating instructions for all products 

*Sample applications 

*Adds you to our mailing list to receive new product news 

'Updates on using the Sinclair with and without our products 

CALL 404-921 -4471 
OR WRITE 

ROM-PAC APPLICATIONS 

5921-AAIhambra 
Norcross, Georgia 30093 

Due to possible trademark infringement Sinclair Applications is now operating under the name of Rom-Pac Applications. 
Neither Sinclair Applications nor Rom-Pac Applications has or have had any connections with Sinclair Research Ltd. 



Will keep 
your Sinclair summing! 




OUR $14.95 SINCLAIR AND TIMEX OWNER-PROTECTION SERVICE PLAN 

WILL SAVE YOU MONEY 



Timex too! 

Typical repair charges for a 
Sinclair ZX81 can run from $25 or 
$50 up fo the replacement cost of 
the unit. So why take chances? 
MicroSync will guarantee unlimited 
service for one year, parts included, 
at one low price. With return postage 
and handling paid. Plus our VIP 
treatment for fast turnaround. 

MicroSync's experienced 
technicians are ready to service 
your ZX81 or Timex/Sinclair 1000 
with factory replacement parts. We'll 
return it promptly, and we'll quality- 
check your unit before it leaves our 
service center. 

We made over 10,000 
Sinclairs tick last year. 

Sinclair equipment has a great 
reputation for reliability. But almost 
all computer equipment requires 
service at one time or another. 
We've been repairing Sinclairs ever 
since their first glitch. 



%- 




MicroSync is THE Sinclair 
authorized Service Center. 

Your Sinclair computer is a 
remarkable assembly of electronic 
components, some unique to 
Sinclair technology Our Sinclair 
personnel have been trained on, and 
service only Sinclairs. 



The line print. MicroSync's Maintenance Agreement covers all parts and service lor 12 months 
after the expiration ot original warranty. For units over 90 days old, coverage is for 12 months 
from the date of the Maintenance Agreement. Kits or modified units may require a surcharge. 
MicroSync may not repair units damaged by abuse or negligence. Liability extends to repair or 
replacement only. 



We have the experience it takes. 
We have the parts on hand. 

So act now! If your unit is less 
than 90 days old you can purchase 
our Owner-Protection Service Plan 
for only $14.95. 



Mail To: MicroSync 

162 Marlboro St 
KeeneNH 03431 

Please send Maintenance Agreements for 
the equipment listed below: 

ZX81 or Timex/Sinclair 1000 

Less than 90 days old 

(include proof ot purchase) $14.95 ea. 

Over 90 days old $34.95 ea. 

16K RAM 

Less than 90 days old 

(include proof of purchase) $12.95 ea. 

Over 90 days old $29.95 ea. 

Total Enclosed U.S. $ 

Serial nos. 



□ check □ M/C U VISA 

Card # 

Name 

Address 

City 



Exp 



. State . 



-Zip. 



MicroSync 

AUTHORIZED SINCLAIR SERVICE 



BEHIND EVERY 
GOOD SINCLAIR 
IS A MEMOPAK 



If you own a Timex-Sinclair 1000 or 
ZX81 computer, you should have a 
Memopak behind it. From increased 
memory to high resolution graphics, 
Memotech has a Memopak to boost your 
system's capabilities. Every Memopak 
peripheral comes in a black anodised 
aluminum case and is designed to fit 
together in "piggy back" fashion to enable 
you to continue to add on and still keep an 
integrated system look. 



Printer Interface^ ^^ Memopak RAM 
High Resolution Graphics 

Order at no risk 

All Memotech products carry our 10 
day money back guarantee. If you're not 
completely satisfied, return it in ten days 
and we will give you a full refund. 
And every Memotech product comes with a 
six month warranty. Should anything be 
defective with your Memopak. return it to 
us and we will repair or replace it free of 
charge. Dealer inquiries welcome. To order 
any Memotech product call our toll-free 
number 800/662-0949 or use the order 
coupon. 



L JU JVIdl. 

CORPORATION 

7550 West Yale Avenue 

Denver, Colorado 80227 

(303) 986-1516 

TWX 910-320-2917 



^S£ 



»6W. 



1 nenopatt i/f 














•B 




i Mail in: Memotech Corporation. 

j Code: SYCO-11-12 


7550 West Yale Ave.. Denver, CO 80227 i 
Total 


I Mk RAM 


S17995 




! UK RAM 


10995 




I I6KRAM 


5995 




Centronics Parallel Printer Interface 


104 95 




I RS232 Pnnter Interface 


135-95 




High Resolution Graphics 


144.95 




I Shipping and handling 


495 


$495 1 


j * All prices quoted in IS dollars 




Tax" 


** Colorado residents please add sales tax 
MtaoOri D visa 


Total 








Name 


| Address 


'aty 




Sate Zip i 



Memopak 64K RAM The 64K RAM extends the 
memory of your Sinclair by 56K to a full 64K. It 
is directly addressable, user transparent, is 
neither switched nor paged and accepts such 
BASIC commands as 10 DIM A (9000). The 
Memopak 64K turns your Sinclair into a 
powerful computer suitable for business, 
recreational and educational use. No additional 
power supply is required. 

Memopak 32K RAM The 32K RAM Memopak 
offers your Sinclair a full 32K of directly 
addressable RAM. Like the 64K Memopak, it is 
neither switched nor paged and enables you to 
execute sophisticated programs and store large 
data bases. It is also fully compatible with 
Sinclair's or Memotech s 16K RAM to give vou a 
full 48K of RAM. 

Memopak 16K RAM The Memopak 16K RAM 
provides an economical way to increase the 
capabilities of your Sinclair. And at the same 
time, it enables you to continue to add on other 
features with its "piggy back" connectors. It is 
compatible with the Sinclair 16K or a second 
Memopak 16K or Memopak 32K to give 32K or 
48K of RAM respectively. 

Memopak High Resolution Graphics The 
Memopak HRG contains a 2K EPROM monitor 
and is fully programmable for high resolution 
graphics. The HRG provides for up to 192 by 2*8 
pixel resolution. 

Memopak Printer Interface The Memopak 
Centronics Parallel or RS232 Interface 
paks enable your Sinclair to use a wide range of 
compatible printers (major manufacturers' 
printers available through Memotech at 
significant savings). The resident software in the 
units gives the ASCII set of characters. Both 
Memopak printer interfaces provide lower case 
character capabilities The RS232 Interface is 
also compatible with modems. 

New products coming soon Memotech will 
soon be introducing four new Sinclair 
compatible products: a high quality, direct 
connection keyboard, a digitizing tablet, a 16K 
EPROM and a disk drive. Watch for our future 
advertisements. 



The Magazine for Sinclair users and Timex/Sinclair users 




LJI-I 




November/December 1 982 



Volume 2, Number 6 



DEPARTMENTS 
4 Letters 

10 SYNC Notes 

1 3 Glitchoidz Report Grosjean 

16 Try This Ho, Laska, Jury 

1 9 Just tor Fun Hampson, Hollandsworth, 

Maloff, Passler 

115 Resources 

1 20 Index to Advertisers 

SYNC AT THE DRAWING BOARD 

25 Turtle Graphics Woodson 

A popular graphics technique 

29 Curve Plotting Graphics Booth 

Producing graphics by formulas 

39 Meditations on a Hypotrochoid Rogers 

Drawing pictures by formulas 

41 A Machine Code Graphics 

Line-Drawing Subroutine Kopyc 

Add line-drawing to your programs 

48 Flicker-Free Four Times Normal 

Character Scrolling Van Workum 

A 4K ROM machine code routine for 4x4 letters 

65 Large Letters for the 8K, 2K Machine Carroll 

An 8K ROM machine code routine for 4x4 letters 

PROGRAMMING TECHNIQUES 

62 Line Print Utility Albrecht 

First steps to word processing 

73 Warp 81 Bonner 

Translating a 4K ROM program to the 8K ROM 



80 Renumbering Basic Statements Wolach 

Line numbers. GOTOs, and GOSUBs 

HARDWARE 
87 Your Timex/Sinclair Can Become 

a Remote Terminal Rice 

Building the interfacing board 

MACHINE LANGUAGE 

1 02 Block Transfers: Variables Transfer Scher 

Machine language programming techniques, part 2 

GAMES AND PROGRAMS 

98 Building Heat Load Reinhardt 

Calculating options for energy conservation 

1 00 Random Walks Chandler 

The graphics of random distribution 

1 1 4 A Keyboard Learning Game Charles 

Master your keyboard and have fun 

REVIEWS 

36 Tne Zedex Microfair Beloff 

Report on the 4th ZX microfair 

110 You Can Review Products SYNC Ahl 

Do you want to be a reviewer? 

1 08 Mazogs Grosjean 

Game review 

1 09 Sea Wars Grosjean 

Game review 

111 HOT Z Schiller 

Software review 

112 The Quicksilva Programmable 

Character Generator Wren-Hilton 

Hardware review 



Staff 



Managing Editor 
Contributing Editor 
U.K. Correspondent 
Art Director 

Assistant Art Director 
Typesetters 

Operations Manager 
Personnel and Finance 
Fulfillment 

Advertising Sales Manager 



E3 



Paul Grosjean 

David Ornstein 

Martin Wren-Hilton 

Patrick Calkins 

Diana \eyri Rudio 

Karen K. Brown 

Renen Cole 

William L. Baumann 

Patricia Kennedy 

Frances Miskovich 

Carol Vita 

Karen Musmeci 



Volume 2. Number 6 

SYNC (USPS: 585-490; ISSN: 0279-5701) is published bi-monthly by 
Ahl Computing. Inc.. a subsidiary of Ziff-Davis Publishing Company. 
David Ahl. President; Elizabeth B. Staples. Vice-President: Selwyn 
Taubman. Treasurer: Bertram A. Abrams. Secretary. 39 E. Hanover 
Ave.. Morris Plains. NJ 07950. Second class postage paid at New York. 
NY 10001 and at additional mailing offices. 

Subscription rates: USA: One year Id issuesi. Sib: two years ( 12 issuesl. 
$30: three years (18 issues). s-)2. Canada. S3 per year additional. Other 
foreign: $5 per year additional. 

1 oi SYNC advertising information, contact Karen Musmeci. SYNC 
Advertising Sales Manager, Ziff-Davis Publishing Company. One Park 
\\c.. New York. NY 10016 (phone: 212/725-4216). 

All other correspondence should be addressed to: SYNC, 39 E. Hanover 
Ave., Morris Plains, NJ 07950. In U.K.. SYNC. 27 Andrew Close. Stoke 
Golding. Nuneaton CV13 6EL. 

Postmaster: Send address changes lo SYNC. PO Box 789-M. Morristown. 
NJ 07960. 



Cover illustration by Frank Cerulli 



November/December 1982 





Comet Crusher 

Dear Editor: 

Chuck Dawson's Comet Crusher in 
SYNC 2:4 was interesting, but, if you 
have more than IK RAM, you can add 
to its visual appeal. Here is a listing of 
the program which illustrates some of 
the visual effects possible (Listing 1). 
Using 

PEEK 16396 + 256*PEEK 
16397-16509 
I came up with 1531 bytes, including 
line 9 and the subroutine at 350. With- 
out these I get 1 344 bytes. 

I love my ZX81 with the 16K RAM 
and never cease to be amazed at its 
power. SYNC has really opened my eyes 
on that score. But, being a novice, I 
would like to see some very basic articles 
on machine code with the ZX81 in 
mind. 

Keep up the good work. 
George T. Milonas, Lt. Col, USAF 
(Ret.) 

8130-H Bridgeport Way, SW 
Tacoma, WA 98499 



1 REM "COMET CRUSHER" TO SPUE 

goto see 

3 LET 5HOT=B 
4. LET HITS>e 

5 PRINT PIT O.e; 

6 for i=e to aa 

7 PRINT 



RT 



9 GOSUB 350 
IB LET H=1B 
IS LET R=0 
ae LET Y=3? 

25 LET X=B 

26 PRINT RT 12, 1; " 
T," ";RT 14..a:"H TTS ".HTT.S 

28 IF SHOT = IB THEN PRINT 

1; "VQUOpT ".; HITS; " H 

1B";TRB i: "SHOT TS F O lT 

"i_ (Hrrs/sHoTVtlea; ™ " 

CENT." 

34 If 5HOT=ie then stop 

3fl PRINT RT 18, 19; "fiTftB 19;"' 

|";TRB 19 >J_ "W 

4.8 PRINT RT 28,1; "PRESS IBFJB TO 



SB PLOT X-1,Y 

7B UNPLOT X,Y 

8B LET X=X+1 

9B IF X>63 THEN GOTO S 

lee IF INKMY*="F" RND R=B THEN 
LET SHOT=SHOT + l i- , 

IBS IF INKEY*."F" THfcN LET R=l 

11B IF INKEY««"F" THEN PRINT RT 



11B IF INKEV««"f 



HEN GOTO 3B 
13B LET H=H-1 
1*B PRINT RT H.19 
",TRB 19; "V1";TRB 19 



1»" , TfW» 19, 

i; "BB";trb 



19 

155 IF X-AB AND H<4 AND H>B THE 
N GOTO 2BB 
16B IF H=B THEN GOTO S 
17B IF H«l? THEN GOTO SB 

18B GOTO 68 

288 PRINT RT 3,17 i UBP",THB 17 



'■^B1".:TAB 16, "■ 
2B3PRINT RT B,li 
285 GOSUB 300 
SIB PRINT RT 18,3; 
I F PFSTRDVFa" 



"COMET PftRTIC 



215 LET HITS=HITS+1 

22B FOR N=l TO 75 

238 NEXT N 

2*8 GOTO 5 

388 FOR 1=8 TO 6 

318 PRINT TAB 16, "^^HT 

328 NEXT I 

338 RETURN 

358 FOR 1=1 TO 8 

368 LET Y = INT (RNDODtl 

378 IF Y=19 OR Y=2B THEN GOTO 3 
68 

388 LET X = INT <RND*12> *1 

398 IF X=3 THEN GOTO 38B 

4.B8 PRINT RT X,Y; "B" 

4.18 NEXT I 

428 RETURN 

588 SRUE "COMET CRUSHES" 

518 RUN 



Line notes: 

General note: underlined words mean 
use the graphics mode to get the inverse 
letters. 

7: inverse space (32); provides black 
backdrop. 

9: May be omitted if short of memory. 

26: Puts scoreboard on screen. 

30: Graphics on E and 5. 

50: Graphics on S (32). 

110: inverse space (17). 

140: Graphics on E and 5; inverse as- 
terisk and space. 

200: Graphics on QEBE; EQ.R; 
.WZ # E; provide debris after hit. 




\v 



V\e 



x* 




Bob Berch's 

Integer BASIC COMPILER 

—increase your speed 20 plus times! 

—amazing 3K program includes all run 

time routines 



commands/functions 




DIM 




RAND 


•256 variables (two letter)\ 


FOR/NEXT 


CLS 




LET 




COPY 


-26 single DIM arrays 


IF/THEN 




SCROLL 




GOTO 




AND, OR 


sorry, no strings except 
m PRINT i 


GOSUB/RETURN 


NOT 


PRINT 




ABS 


LPRINT 




SGN 


■two versions 


PLOT/UNPLOT 


USR 


1 6K w/code in 29-32K 


POKE 




RND 


64K w/code in 13-16K 


STOP 




PEEK 




FAST 




INKEYS 




SLOW 




MOD(*") 




PAUSE 




AT & TAB 


$22.00 ppd 




both 


versions 


'or (cassette) 
NY residents 

add 7% I 






Bob Berch 






1 9 Jaques St. 




Rochester, 


NY 14620 J) 




Now 

available in 

the United States, 

Britains" best-selling "^" ZX81 workstation is a 

stylish yet practical plinth which will angle your TV to 

reduce eyestrain, conceal the leads and power supply. 

and it you have the 16K RAM it will hold it steady to 

reduce crashes. Moulded in tough black ABS complete 

with a ready-wired on/off switch. Looks really great ! 

Please order Iran our u S Agent-Jim Griner P.O. Box 1 Princevllle. IU. 61 559 
Manufactured By Peter Furlong. Products Unit 5, South Coast Road Industrial Estate. 
Peace Haven, Sussex. England Tel: (07914) 81637 



SYNC Magazine 





I 



I 



1 



I 



If you're writing software for the Timex-Sinclair personal computer, you ought to 

talk first to the software publishing company that will do the most for you and your 

program. Here's six good reasons why good programmers come to us first: 

1. MASS MARKETING CAPABILITIES. 

The Timex-Sinclair computer market is no 
longer a mail-order, hobbyist business. We have the marketing resources to put 
your titles in more than 25,000 retail outlets, including chain stores, mass 
merchandisers, audio centers and PX's. 
2. VERTICAL MARKETING CAPABILITIES. 
At the same time, we also sell actively to the kind of specialized 
audiences who can't be reached through mass market outlets. If you've written the 
definitive program for machine shop estimators, we know where to sell it. 
3. BETTER ROYALTY TERMS. 
Since we expect to buy the best in Timex-Sinclair 
software, we expect to pay the best in royalties. And we pay promptly and 
frequently— a policy that, sadly enough, many other publishers 
seem to feel is unnecessary. 
4. "QUICKLOADING". 
Every title we sell now incorporates our 
unique "Quickload" algorithm. "Quickload " enables your program to load 
at a rate six times faster than other Timex-Sinclair software. That kind of 
special feature means bigger sales— and bigger royalties. 
5. PROFESSIONAL PACKAGING AND PROMOTION. 
We take our titles seriously. We're willing to 
invest in good graphics, good documentation, good advertising. You'll be proud 
to show off your work , because we are too 
6. WE'RE NICE TO DEAL WITH. 
Mindware isn't a big. impersonal corporation with layers of bureaucrats 
to penetrate We know our leadership in software depends on finding the 
very best authors— and keeping them. So we try to respond quickly 
and honestly, and treat you with respect. 

We can't promise to publish every program you submit. But if you've got a title 
you feel is a real winner, our advice is simple: 



% 



15 Tech Circle Natick, Mass. USA 617-655-3388 



220: For a pause without jerkiness of 
PAUSE. 

300: Erases comet and rocket. 

310: 5 inverse spaces. 

350-420: See line 9; may be omitted if 
short on memory; provides a few stars in 
the sky. 

370, 390: Keep clear path for comet 
and rocket. 

400: Inverse +. 

DEF 

Dear Editor: 

Jon Passler's article on DEF (SYNC 
2:4) is very helpful, but the action can be 
speeded up a bit by adding as follows: 

IK RAM: 

102 PRINT AT 0,0;AS 

105 FAST 
16K RAM: 

175 FAST 

200 delete 

300 delete 

325 SLOW 
For some reason my machine pro- 
duced an "INTEGER OUT OF 
RANGE" code for line 160 in the 16K 
program — so I substituted. 
David M. Hoke 
Apt. D4, Eastampton Gardens 
Mt. Holly, NJ 08060 



Draw It 

Dear Editor: 

In the Draw It program in SYNC 2:4 
lines 60, 70, 80, and 90 can be deleted 
and the following lines put in: 

60 LET X = X + (INKEY$ = "8")- 

(INKEY$ = "5") 

70 LET Y = Y + (INKEY$ = "7")- 

(INKEY$ = "6") 
Robert Jorgenson 
3814 Coleman Ave. 
San Diego, CA 92154 

Strong KBD Signals 

Dear Editor: 

I would like to publicly thank Herb 
Hornung (Double H Electronics, 195 
Lelani, San Antonio, TX 78242) for his 
hardware tip concerning strong signals 
from KBD 0-4 (SYNC 2:4). I had been 
having keyboard troubles with the kit 
from the time I put it together. This was 
one of the reasons I purchased a key- 
board from Herb. At that time he made 
some recommendations which helped 
quite a bit. Examination showed that a 
very strong signal from KBD would 
often "crash" the system when a key in 
that circuit was used. Herb's article, per- 
sonal correspondence, and the substitu- 



tion of 6.8k ohm resistors for the 
Sinclair resistor pack straightened out 
all the problem I was having. I highly 
recommend the Double H keyboard for 
those who have trouble getting their fin- 
gers around the membrane keyboard. 
Lawrence A. Kelly 
28 Countrywood Dr. 
Morris Plains, NJ 07950 

List Learning 

Dear Editor: 

I am writing to express my thanks to 
James John Hollandsworth for "List 
Learning with the ZX81" (SYNC 2:5). 
The program ran beautifully and my 
eight year-old enjoyed it. He has already 
started to learn the states and their cap- 
itals, and he gets to use Dad's computer 
to boot! 

There were some parts of the program 
that I changed slightly to make it run 
smoother. When the program that I 
changed slightly to make it run 



LIMITLES S EXPANSION FOR SINCL AIR/TIMEX 

FLOPPY DISC INTERFACE $179 *f-4 drives, any size* single/ double 

DENSITY + INDUSTRY STANDARD IBM FORMAT * ON BOARD DOS IN ROM ^ 

RIBBON CABLE CONNECTIONS FOR MAXIMUM RELIABILITY w 

WOO TIMES FASTER THAN CASSETTE * ^ . 

5.25" DOUBLE DENSITY FLOPPY DISC DRIVES $189 ea. 
POWER AND CABLES FOR 2 DRIVES $69 FOR 4 DRIVES $79 

STD BUS INTERFACE $99 complete with ribbon cable 

CHOOSE FROM 300 PERIPHERAL INTERFACES, 60 MANUFACTURERS 

CENTRONICS PRINTER INTERFACE $119 complete with * 

PRINTER CABLE, SOFTWARE IN ROM 

DIRECT VIDEO MODIFICATION $25 we install $15 you install 

WORD PROCESSING SOFTWARE PACKAGE $15 machine language 

BOX 18093 AUSTIN 
TX 78760-8093 
(512) 385-7405 





November/December 1982 



T>£ 





^1. -0*"" /^% ♦•b 



x:: j-» * J JO 



u 3 



id ° 
3 E 



u 



S2 

Oj CO 



3 5 






■ j i 

J= C T3 « 3 a 

il* 

5Sr 



*3- ^ > ^ , 

" - % * 



c £ 1 

: ^ »- — ( 
: ^ Or ^ 

IliOi' 

I 5 3? 

;5~ = 

: — 3 t, 



SE 






w ■% c 

^ >-£ 

u c - 
a.°c 



^ > . 

flu 5 < 

TOO; 

^ — , 
o5l 

. "*• 



fat U ^ 

:e*S8S!! 

5 o £■= 

- .- F a; q 

-o; 

'5 3 C C >-T> 

1 9 ^ ">. •?. : Q -P. 




m OK 

nOUZ 




smoother. When the program ws put 
into "Review" mode, the screen had an 
annoying blink that was rather distract- 
ing. The reason for the blinks was the 
PAUSE statements used. 

The solution was to replace them with 
FOR/NEXT loops as follows: 
210 (change the zeros to l's) 
217 IF Z<1 or Z>9 THEN 
GOTO 215 

235 FORR=l TOZ*10 

236 NEXT R 

237 POKE P, Q 

Use the line content of 235-237 to make 
three more loops: 
250-252, 280-282, 295-297. 



Again, special thanks to James 
Hollandsworth for this very useful learn- 
ing tool. 
K.R. Peters 
14 Meade Ct., #2 
Fox Lake, IL 60020 

Ed. — The use of the PAUSE routines in 
"Listing Learning" indicates that the 
program may be used on the ZX80 (8K 
ROM). In our last issue we noted that 
programs for the ZX81 and the ZX80 
(8K ROM) are virtually identical except 
that certain types of displays on the ZX80 
(8K ROM) need the PAUSE routines as 
a substitute for the SLOW mode. If you 
have the ZX8I or the T/S 1000. you can 
substitute the FOR/NEXT loops, but you 
can also just omit the PAUSE routines. 



YOUR ZXB1/XII 



1000 WORK F"OR YOU f 



PERSONAL AND BUSINESS PROGRAMS: 

Are on cassette, are menu driven and save on tape automatically. 

SALES FILE 16h: 

Will hold up to 125 products with thei'* wholesale and retail prices. 
Separates and totals wholesale and retail prices and shows the amount of 
profit in up to 25 different accounts. - Records inventory automatically 
or may be changed manually. - Keeps a running total of sales ta::. 
Has a cash register mode which will identify, total, and add sales 
tax while it automatically keeps records for your bookkeeping. 

SALES FILE 64K: Same as above e>:cept it will hold up to 600 products for up to 
100 accounts. »*Specify 16K or 64K»* 
### A must for any small business. *»* *19.95 

CHECKING 16K: 

Lists up to 25 deposits showing amount of deposit and date entered. 

Lists up to 80 checks and displays check number, date and to whom check was 

written. - Lists by account the total of the checks written to any given 

account. - Keeps a running total of checks written and the balance left in 

your account. - Search for a check by check number, name, date or amount 

to find any check quickly. 

*»* Great for tax records. *** S9.95 

MAILING LIST 16K: 

Holds up to 100 names, addresses and telephone numbers. - Search by name, 
city, sip code, or phone number to find any address or phone number 
quickly. - Lists all names, changes or deletes. 
#*# Christmas cards are a snap with this program. »** $9.95 

INVENTORY (1) 16K: 

May be used for everything from keeping an accurate inventory for your 
business, to your personal record collection. - Holds up to 150 items with 
comments for each. - Comments may be used for serial numbers, dates, 
prices or location. - List all items, search for a single item, change or 
delete any item. - *** Everyone should have an inventory of household 
items in case of fire or theft. *** 

INVENTORY (1) 64K: Same as above with up to 750 items. 

»♦* Specify 16K or 64K *»* S9.95 

INVENTORY (2) 16K: Same as above without comments. 

Holds 300 items. $9.95 

EDUCATIONAL PROGRAMS! On cassette and menu driven. Require 16K. 

MATH QUIZ: 

Allows user to choose addition, subtraction, multiplication, or division 

for up to 50 problems, with difficulty levels from 1 to 6. 

Each problem may be listed with the correct answer. 

**« Great for home or class room »»• *9.93 

FLASH SPELLING: 

Enter up to 50 words for your child to learn to spell. - You determine how 
long you want the word to be flashed. - Misspelled words may be listed. 
»»» Word files may be saved on tape. **» »9.95 

Send certified check or money order to: HEATH COMPUTER SERVICES 
Indiana residents add 47. sales tax. 950 East 52 South 

*dd J1.00 per tape shipping. greentown, in 46936 

Dealer inquiries invited. Phone 317-628-3130 

8 



Pantry Inventory 

Dear Editor: 

I thoroughly enjoyed Dr. Justham's 
"Pantry Inventory" (SYNC 1:6). I have 
expanded upon it, and I would like to 
share a more efficient search routine us- 
ing the LEN command. Rather than use 
up memory space by creating a separate 
array M$ in line 3044 with which to 
compare the "item" sought (C$), com- 
pare C$ to the original array 1$ (B) di- 
rectly as follows: 

3040 INPUT C$ 

3050 FOR B=l TO 150 

3060 IF C$ = I$ (B) (1 TO LEN 
C$) THEN GOTO 3100 

3070 NEXT B 
Using the same method, it is possible 
to expand the search routine to search 
records internally, i.e., looking for 
strings within a heading and not limited 
to the first characters within that 
heading: 

FORB$=l TO 150 

FOR J=l TO (LEN 1$ (B)-LEN 
C$+l) 

IF C$ = I$ (B) (J TO J + (LEN C$- 
1)) THEN GOTO 3100 

NEXT J 

NEXTB 
If you have a larger number of 
records, this search may take a while, 
but it is very thorough. Thanks for your 
highly entertaining and educational 
magazine. I look forward to my next 
issue! 
Jeff Hino 
929 NW 28th 
Corvallis, OR 97330 



Lunar Lander 

Dear Editor: 

If you have more than 1 K RAM, you 
can modify Chuck Dawson's Lunar 
Lander (SYNC 2:1) with the lines given 
below which will indicate a safe landing, 
your pilot's rating, and the reason for 
the rating. 
Dick Bloom 
PO Box 91 
Cloudcroft, NM 88317 



40 IF NOT H RND U<-100 THEN ST 
OP 

4,1 IF H THEN GOTO 11 

48 IF NOT M RND UJ-10B THEN PR 
INT "SRFE LANDING'' 

*3 IF NOT H AND r (6000 THEN PR 
INT RT 20 , 16; "CHNDR" 

44 PRINT "GOOD FUEL USE" 

4.5 IF NOT H RND F<400« THEN PR 
INT RT 20. 16: "CRPT. " 

46 PRINT "FRIR FUEL USE" 

4.7 IF NOT H RND FOBB0 THEN PR 
INT RT 20. 16; "PRUT" 

48 PRINT "NEED TO CONSERVE FUE 
L" 

49 IF NOT H RND F < 1000 THEN PR 
INT RT 80, 16; "RESCHOOL" 

„S» PRINT "TOO HUCH FUEL USED 

SI STOP 



November/December 1982 






SINCLAIR/TIMEX USERS 

NOW SYNERGISTIC OFFERS YOU THE SMART™' CHOICE 
DESIGN 



THE SYSTEM LOGIC KBD-I 
SMART™' KEYBOARD 
ENHANCEMENT FOR 
SINCLAIR/TIMEX 
COMPUTERS 






eened graphics 
se of Sinclair/Timex machines. 
hese were not available for this 
ent. 



SYSTEM LOGIC — KBD-1 



The System Logic KBD-I Keyboard en- 
hancement offers Sinclair ZX-80, ZX81 
and Timex TS-100 users an intelligent 
keyboard peripheral. 

A KBD-I allows an increase in user 
throughput by as much as 70% while re- 
ducing fatigue factor errors. 

Now enter data and programs quickly 
without having to 'hunt' for key contacts. 
Each key produces 'tactile' feedback in 
addition to employing right-and left-hand 
'smart' shift keys. The KBD-I remains in 
the shifted mode with a single keystroke, 
while exiting from the shifted mode with a 
second (left or right!) keystroke entry. 



The KBD-I simplifies integrating your 
computer system into a professional or 
business application. The compact size 
of the KBD-I permits easy portability, its 
brushed aluminum black anodized cabi- 
net is a cautious blend of attractive 
design and the highest quality engineer- 
ing and manufacturing techniques. 



SMART ™ )M ta. s 

Patent Pending 



FEATURES 



, SMART™' shift function 

i Tactile feedback 

. 59 keys (with left and right shifts) 

• Standard (QWERTY) typewriter format 

• Silk screen labels compatible with 
Sinclair/Timex keyboard 

• Compact design 

• Rugged yet attractive black anodized 
aluminum cabinet 

• Simple installation 

• Custom engineered for Sinclair/Timex 
computers 

• Auto-repeat function (fast/slow modes) 



SPECIFICATIONS 



Contact resistance: 20£2 @ 1 mA 
Contact rating: 1 .OV/A 
Contact bounce: ^5.0mSec. 
Switch life: 5.0x1 6 operations 

typical 
Switch force: < 9.0 oz. 
Switch travel: .015 in. 



MAIL ORDER TO: 

SYNERGISTIC DESIGN 

P.O. BOX 41 1023 
CHICAGO, ILLINOIS 60641 



'Illinois residents include 
6% sales tax. 



SYSTEM LOGIC KBD-I KEYBOARD 


PRICE 

$85.95* 


QTY 


AMT 


Shipping and handling (per unit) 


$ 4.95 




$ 4.95 


Money order or check 




TOTAL 





NAME 



ADDRESS. 
CITY 



.STATE. 



.ZIP. 



SLjnc nates 



SYNC at the Drawing 
Board 

Our theme section this issue is 
"SYNC at the Drawing Board." This 
selection of articles illustrates some of 
the techniques that can be used to gen- 
erate graphics displays. If the number of 
manuscripts we receive means anything, 
producing a graphics display is among 
the most popular challenges of computer 
programming. 

All of us can draw a picture on paper 
(some better than others, of course). We 
envy those who can draw real pictures 
with a few movements that seem so 
effortless. Now the computer has given 
us all another tool for making pictures 
and the challenge of mastering the dis- 
play screen. 

Simply filling the screen with a graph- 
ics display is one of the first program- 
ming efforts. Such a display can be 
produced through a program involving a 
random element such as several of our 



"Try This" entries have done. These 
brief programs can fill the screen with 
constantly changing patterns. However, 
we have no control over the display once 
the program begins running. The 
greater challenge is to produce a display 
that shows what we want whether a pic- 
ture or some kind of graph or design. 
The ultimate display is one that the user 
can interact with and that will modify it- 
self in response to user input. The games 
with moving graphics are prime exam- 
ples of this type. 

Graphics are fun for their own sake. 
To be able to control the graphics 
capabilities to produce hi-res displays is 
the programmer's reward. In order to 
develop displays with moving graphics 
and high economy in programming, we 
need to learn something about machine 
language programming. However, many 
are also interested in using graphics as 
part of a larger program to display data, 
liven up programs, provide a challenging 
game, or just have the fun of creating a 
display. 



The programs in our theme section 
illustrate how mathematical formulas 
can be used to provide graphics, how to 
get the smooth graphics that resemble 
movie or TV pictures by the use of ma- 
chine code, and how to use such pro- 
grams as subroutines within larger 
programs. We hope that these articles, 
along with our "Just for Fun" entries, 
will challenge your imagination and give 
you some tools for your own 
programming. 

Theme Sections 
Coming 

Our next issue will feature "SYNC in 
the Home Office." Other projected 
themes include "SYNC on the Job" 
which will show some of the ways 
Timex/Sinclair owners are using their 
computers for their jobs, "SYNC at the 
Concert" which will show some of the 
musical capabilities, "SYNC at the Ar- 
cade" which will put together some ar- 
cade type games. 

Other theme sections will depend on 
the availability of articles to support the 
setion. So if you have a possible article to 
support one of these themes, we want to 
see it. 




ZXPRESStm - 

Non-Trivial Solutions' new Integer Basic Compiler! Now you can write 
programs in rapid time! 

• compiles ZX-81 Basic source code to machine language: write and debug 
in a subset of ZX-8 1 Basic: compile when it's right 

• increases the speed of the ZX 81 20 to 50 times 

• 208 regular variables. 26 dimensioned variables: variables are 16 bit 
two's complement integers 

• compiled code can be stored in REM or in 2000H to 3FFFH address 
segment, if available 

• the source code can be located anywhere and the position of the com- 
piled code can be selected, allowing you to write a long program, com- 
it in pieces, and link the pieces 

• 4 functions - PEEK. RND. USR. IN KEY$ 

• 14 key words 

• 16K or more RAM 

• $29.95 

• Still available: 

• Letter Raiders & Life with Palette 
• challenging games 
• $9. 95 each 

(Copyright 1982 NON-TRIVIAL Solutions) 



ZXPRESS 



Letter Raiders 



Life with Palette 



QUANTITY 



PRICE 



$2995 



$995 



$995 



TOTAL 



• eck enclosed Charge my I ] Mastercharge 

Card No Exp. Date 

Signature 



\mpiviALSniTit*}! 



P.O Box 2941 
Amanita. Texas 79105 
(806) 376-5723 



10 



SYNC Magazine 



Britain's leading Software house means 



**% 



ADVENTURES: 

dictator— 

msel and the Beast. 

use of Gnomes 

tCADE: 

azogs_ 

Invaders. 

Space Trek — 
UTILITIES: 



$20.00 
$15.00 
$16.00 

$22.00 

$10.00 

_$12.00 

$12.00 
$15.00 
$14.00 



y, majiy mor 

b inr«inde postage 




BYTE- BACK modules 



64-K MEMORY $11 9. 95 



By TE-BACK Co. 

M-64 



INSTANT INFORMATION 

,-yL WITH 

^QM BYTE-BACK'S MD-1 

X MODEM only $119.^ 

WIRED and TESTEO S149 95 

Use your phone to connect your "LITTLE"ZX81 to the 
LARGEST" computer networks in the world. With BYTE- 
BACK's MD-1 MODEM connected all you do is dial a 
phone number (usually local), press a few keys and watch 
the data appear on your TV screen (Software is included) 
This MODEM can be used in either the originate" or 
"answer" mode with selectable baud rate. 

You can have immediate access to: 

UNIVERSITY COMPUTERS, DOW JONES, 
UPI, AND MORE ! 

As an extra bonus an RS-232 port is provided to 
allow you to drive all standard RS-232 peripherals 
(75 to 9600 Baud) 



BYTE-BACK'S BB-1 

CONTROL MODULE 
$59.op in Stock! 

WIRED ana TESTED S69 

• 8 Independent Relays 

(with LED status indicators) 

• 8 Independent TTL Inputs 

(with Schmitt trigger buffers) 

• By using a single POKE command 
you can change and latch thi 
of each ot the 8 relays 

• Your ZX80/1 can read the 
of all 8 inputs by the use of a 

single PEEK command 

• A comprehensive manual is in- 
cluded that has complete application 
details 




WIRED and TESTED $129.95 

IN STOCK! 

SAME DA Y SHIPMENT! 
WHY PAY MORE? 

BYTE-BACK'S M-64 extends the memory of your ZX81 or 
Timex-Sinclair 1000 to a full 64-K It's user transparent It 
plugs directly into the back of the ZX81 and has an 
expansion port to allow you to still use a printer. No extra 
power supply is required It has all standard features plus 
the area from 8-16-K can be switched 6ut in 2-K incre- 
ments for memory mapped peripherals. PROMS, etc 
Same proven reliability as our M-16 with thousands in 
use 



EXPAND YOUR 16K SYSTEM 
< M " 16 > $59.?5 

i«IRI D II I TEI TED S69 95 

If you have a Sinclair 16K 
RAM module and need more 
memory, expand it to 32K and 
beyond by using BYTE-BACK 
M-16 MEMORY MODULES. 
You cant connect two Sin- 
clair 16K RAM modules together, but you can connect 
one Sinclair 16K and one or more BYTE-BACK 16K 
modules to get all the memory you need 

THOUSANDS IN USE WITH PROVEN RELIABILITY 
IN STOCK - SAME DAY SHIPMENT 




RS-232 Module $59. 95 

WIRED and TESTED $69.95 IN STOCK 

Allows you to connect ZX81 to all RS-232 printers & terminals. 



ALL MODULES CARRY 90-DAY WARRANTY 

TRY BYTE BACK MODULES FOR 10 DA rS WITH NO OBLIGATION 



Remember with: BYTE-BACK modules you are NOT limited to using only one module at a time! 



Q 
CE 

— 
Q 
O 
rr 

m 



o 
f» 

o o* 

O) T- 

CM CO 

. m 



N 

T— 

X 

O 



m m 



d oo 

> w 

W £ 

LU 0- 
UJ 



□ M-64 Kit . . . S119 95 

D M-64 Wired and Tested S 129 95 

□ M-64 Blank PC Board ... S1995 

□ BB-1 Kit and Manual S59 

□ BB-1 Wired and Tested and Manual . S69 
D BB-1 Blank PC Board and I S29 

Shipping and Handling S4.95 



16 Kit 

(Tested 

' 16 Blank PC Board ... 
- it 

ind Tested 
Kit 
RS-232 Module Wired and Tested 



SS9 95 

S19 95 
$119 95 
$149 95 
S59 95 
S69 95 



ORDER PHONE (803) 532-5812 

Exp Date Card No 

Name 



Bill My D Visa 



□ MasterCard 




Address 



City/State/Zip 



CHECKS 






1 



MasterCard 



Mail To BYTE-BACK CO. • Rt. 3. Box 147 • Brodie Rd. • Leesville. S.C. 29070 



The ZX81 BASIC 
Programming Manual 

If you make a reference to the manual 
that you received with your Sinclair 
ZX81 or 8K ROM in any article or 
correspondence sent to SYNC be sure to 
specify the edition. There are four edi- 
tions of the book available now: the first 
and second British editions and the first 
and second American editions. There 
are some differences. 

SYNC Is Growing! 
You Can Help! 

The first nine issues of SYNC gave 
readers a magazine of 48 pages plus cov- 
ers with about 30-35 pages of editorial 
and 12 to 15 pages of ads. Volume 2:4 
jumped to 80 pages; Volume 2:5 to 100 
pages. This issue has 124 pages showing 
increases in both editorial and ad 
content. 

To maintain this size magazine we 
need your help in two ways: 

1) We need articles and contributions 
from authors. So if you have an article of 
possible interest to SYNC readers, we 
would like to take a look at it. If you 



have been thinking about writing some- 
thing, drop us a note telling us what you 
have in mind. We will tell you whether 
we would like the idea developed and in 
what direction to increase its usefulness 
to our readers. If you missed "Writing 
for SYNC" in SYNC 2:1, send a self-ad- 
dressed stamped envelope for a copy. 
This will help you put your article to- 



gether. If you are interested in writing 
reviews, see p. 1 10 below. 

2) We need advertisers. If you have a 
product, please contact Karen Musmeci, 
our new Advertising Sales Manager (see 
the contents page for details). If you 
have bought a product whose manufac- 
turer or distributor has not advertised in 
SYNC, please plant a suggestion. f5 



Glirchoidz 
Report 

ZX Destroyer (2:4) 

The author suggests the following 
changes and clarifications: 

Figure 6: 

1 REM: 6thjine down, last character is 
U. Last line, change last F to E. 

2 REM: 1st line, change C (5th char- 
acter) to A; change 2 (4th character from 
right) to 1. 

30 REM: 1st line, change 4 (5th char- 
acter) to 5. 

Figure 7: 

Line 90: changee 243529 to 243473; 
488940 to 488758; 612608 to 612426. 

Line 110: change 733561 to 733408. 



Figure 8: 

Do not enter lines 10-35. 

Author's note: I have a SLOW convert- 
er from MicroAce which apparently has 
a different character sync. This causes 
small lines on some characters on some 
computers. POKE 16547,1 might help. 
Some problems with the alien's laser can 
be corrected for those who have the pro- 
gram already entered by: POKE 16748,13; 
POKE 16764,149; POKE 16779,140. 

Just for Fun (2:5, p. 20) 

The first character of the following 
carry-over lines was lost. Add at the be- 
ginning of the carry-over: 
Zap: Line 40: a period. 
Catch 25: Line 120: a comma. 



Block Transfers (2:5) 

p. 71, Figure 2: 

Line 230: Delete. 

Line 260: Add a ; at the end. 



5 



IT'S HERE!! 

The keyboard you have 
been waiting for! 



A LARGE 60 KEY TACTILE FEEL KEYBOARD 
(MEASURES 10" x 4") THAT PLUGS INTO THE SAME 
CONNECTORS AS EXISTING KEYBOARD ON YOUR 
ZX81 OR TIMEX SINCLAIR 1000. IT HAS ALL 
SILKSCREENED LEGENDS IN 3 COLORS ON THE 
BASE; MOLDED LEGENDS & GRAPHICS ON KEY TOPS; 
8 AUTOMATIC SHIFT KEYS (NO SHIFTING REQUIRED) 
FOR EDIT, DELETE, SINGLE & DOUBLE QUOTES, 
COLON, SEMI-COLON, FUNCTION & STOP; 5" SPACE 
BAR; 2 SHIFT KEYS; NUMERIC KEY PAD. 



ONLY $ 70. 



MASS. RESIDENTS ADD 5% SALES TAX 
SHIPPING & HANDLING $4.00/UNIT 

ENCLOSURE AVAILABLE. QUANTITY DISCOUNTS. 
WE ACCEPT MC/VISA. PLEASE INCLUDE #'S, EXP. 
DATEANDSIGNATURE. FOR MORE INFORMATION 
SEND SASE. SEND INQUIRIES, CHECK OR MONEY 
ORDER TO: E-Z KEY 

SUITE 75A 

711 SOUTHERN ARTERY 

QUINCY. MA 02169 



November /December 1982 



PRACTICAL ZX-81® SOFTWARE 




ZX-81® Not Just 

For Games 

Anymore! 



ZX-PANDING, LTD., an American company, uses the tremendous 
ZX-81» data handling capabilities to make our daily tasks easier. Programs 
are on cassette, thoroughly tested, with easy-to-read printed instructions, 
written in BASIC to allow tailoring to your special needs. _ 

1 . YOUR SPECIAL DAY— 1K— Good example of using succes- 
sive equations to answer a practical question. Enter any date in history, 
and ZX-81™ will tell you the day of the week on which it occurred . Useful 
in many fields and a great ZX-81'* demonstration ONLY $3.75" 

2. CLOCKS AND TIMERS— 1K— A digital clock (standard or 
military time), a count-up timer (for telephone calls), and a count-down 
timer (useful in cooking). Another great ZX-81« demonstration ONLY 
$3.75* 

3. ANYP0INT PLOTTER— 1K— Crunches any data to allow 
graphing of any positive data points: stock prices, temperature, experi- 
mental data, etc. . . . ONLY $3.75* 

4 CHECKBOOK, INCOME TAX AND BUDGET ORGANIZER— 16K A 
powerful yet easy to use finance program — 10 jobs in menu driven format. 
Checks and deposits are totaled and itemized under desired categories for 
budget planning and income tax preparation. Makes checkbook balancing 
easy. Ninety transactions manipulated at one time with 16K . ONLY $13.75* 



ZX-PANDING. LTD. 

P.O. BOX 25 
NEWTON, NC 28658 



Free catalog with sell addressed stamped 

envelope 

•ALL orders please add $1 25 to total 

order to cover POSTAGE AND HANDLING 

(Foreign orders add $2 00 to cover air 

costs Your payment must be in a US 

dollar draft payable to US bank) 



New Releases 



timex iooo* /Sinclair- zx-81 



Personal Computer Software 



& W&tP ... 






-^Pl 




^Im- 



personal 
Home 

Business 
Education 
Adventure 



Skate- ^3lL«*>, 




TS/ZXASCOM 

(operates with 1 K on board ram of the 
TIMEX or SINCLAIR] $24.95 
Now the real power of the computer is at your 
finger tips. Our new software routine will operate 
the ZX-81 or TIMEX 1000 as a terminal . . . Program 
requires our parallel/serial board and your 
modem. Converts CLIVE code to full ASCII and 
allows you to have dial access to the computer 
world for data bases or just computer to com- 
puter communications. 

INTERFACE BOARD SERIAL AND PARALLEL 
$99.95 

Super new product. This interface board brings 
the world of TIMEX and SINCLAIR personal com- 
puters into the real world of computers. Features: 

• Centronics Standard Parallel Interface to 
Printers, etc. includes handshaking. 

• RS 232 Serial interface with full specifica- 
tions and input or output. 

• On board driver routines in 2716 EPROM 

• Switch selectable BAUD rate for high speed 
(9600) communications 

When the board is used in connection with our 
TS/ZX ASCOM software then the user can access 
any of the many network ON-LINE services or 
communicate directly with other computers. 

LOW BUDGET 16K RAM PACK 
$44.95 

Just arrived in time for the gift season, a low 
priced 16K ram pack. Standard features of our 
other packs, but it is shipped without the final 
case Guaranteed not to let you down and makes 
memory affordable. 



TS/ZX PAC MAN |16K] 
Adventure Arcade Style $19.95 
Fantastic re-creation of the famous arcade game 
now on the Time* or Sinclair personal computer. 
FAST MOVING and requires a lot of skill. If you 
win at the first level then there is more to follow. 
Degrees of difficulty on a full size screen maze, 
with PAC MAN type graphics and moves. Don't 
miss it. 

C0MP-U-SHAREI.16K] 
PERSONAL HOME FINANCE $24.95 

Excellent program that allows the user to main- 
tain an up to date record of his portfolio. Stocks. 
Bonds. Funds or other financial investments. 
Developed by a professional for his own use. 
Monitor your results or run a forecast of 
expected results Includes P/E ratios, dividends, 
etc User guide included. 

PROPERTY MANAGER |16K] 

BUSINESS or PERSONAL FINANCIAL $24.95 

Our accountant believes that this program 
allows your system to be tax deductible as an 
individual, we will advise upon further notice. 
Property owners or Managers will find this an 
extremely valuable tool. Provides for any com- 
bination of 10 units in 2 buildings or 2 units in 5 
buildings per program. If you have more than 10 
then just run a new copy of the master file. The 
program tracks each unit for RENT, up to 15 var- 
iable expense categories, and 15 fixed expense 
lines, all for a full year. That's right 12 months of 
data including late payments, and optional save 
routines for the ZX-99. 



CASH FLOW FORECASTER and 
BUDGET ANALYSIS |16K| 
HOME or BUSINESS $19.95 
Brand new financial utility for use at home or in 
the office. Keeps detailed records for twelve 
months in the three major categories. INCOME. 
FIXED and VARIABLE EXPENSES PLUS LOAN 
BALANCE OR LINE OF CREDIT. Provides the user 
with the ability to forecast or track the history of 
his cash flow. 

INVENTORY CONTROL AND STOCK ANALYSIS |16K| 
HOME or BUSINESS $19.95 
The first in a series. This program operates as a 
stand alone control or it will operate with the 
ZX-99 Tape control system for file handling. Fea- 
tures include stock control of units and of 
values, with separate routines for receipts and 
returns or sales and shipments. Special routine 
for adjustments in units or values. Program uses 
average cost for inventory value and shipments. 
Allows the user to SORT by code or alpha name. 
Quick access to stock levels. New feature will 
allow the user to automatically expand the files 
for 32 or 64K ram packs. 



data~a//ette 



THE LOGICAL EXTENSION 




Data assette offers Timex and Sinclair 
owners something new. 

Users may up-grade gradually as their needs 
change. Each unit is fully tested and carries our 
90 day guarantee. Purchase the full suite and 
you have a mini-computer with real data pro- 
cessing. Our product range allows the intelligent 



user to expand his system as his needs change. 
Finally all of our software has been specially 
selected to offer the user a tested and reliable 
product that has been developed with two impor- 
tant criteria: user friendly and hardware compat- 



Tape Controllers and Printer Interlace 
Just look at these fantastic features 

• ZX-99 automatic tape control of up to four cassette 
recorders as input or output under full software con- 
trol Printer interface for any RS 232 serial printer giv- 
ing the user access to all 132 characters of ASC II 
characters. Data retrieval word processing for real 
mini-computer capabilities. Plus 1 Automatic tape to 
tape copy, tape block skip and diagnostic assistance. 

• Tape load interface. Say goodbye to the load prob- 
lems associated with the system. The tape loader 
allows the user to test and pre-set the cassette 
recorder to the exact sound level expected by the 
Timex or Sinclair. No more five minute load with un- 
satisfactory results. Unit has LED lights which tell the 
user when the recording level is correct or when the 
sound needs modifying. A real big time saver 



Ram Packs 16K.32K or 64K 

Expands the memory available from 2K up to a maxi- 
mum of 64K. but with a real difference. Our 32K also 
comes in a piggyback version that allows the user to 
plug in his 16K and have a full 48K ol memory. Finally 
you can buy the 32K piggyback version now and add 
another 32K later for a full 64K in the end. Plugs 
directly into the computer and does not require any 
additional power source. Features a LED light to 
signal when the ram pack is operational. 



Keyboards 

The Klik and Executive. Both units offer unique fea- 
tures. The Klik is full replacement for the "Touch Sen- 
sitive" Timex keyboard. Features include separate 
space key. plugs into your Timex. no special case 
required, positive feedback from key depressions. 
Executive keyboard is the ultimate in the ZX-81 
Tlmex/Sinclair range. It is a full size with special fea- 
tures like automatic repeat key. full length space bar, 
and "beeper sound" operated with an on/off switch, 
plugs into the computer or we will retrofit it for you. 



ible or selectable. Now all of this and our full 
range of software (over 50 choices) is available 
from your local Timex computer dealer or store. 
So come on in and try out the latest logical 
extensions. 



PRODUCT 
NAME and CODE 


UNIT TOTAL 
PRICE QTY. VALUE 


Ram-Pack 16K 


S 49.95 






Ram-Pack 32+K 


S109 95 






Ram-Pack 64K 


$149.95 






Ram-Pack 32K 


S 99.95 






Tape Ctl. ZX-99 


S149.95 






Keyboard Mini 


S 75.00 






Keyboard Exec 


S 95.00 






Tape Load Int. 


S 39 95 






Print BdSer/Par 


S 99.95 






TS/ZXPacMan 


S 19.95 






Comp-U-Share 


S 24.95 






Property Mgr. 








Forecast/Budget 


S 19.95 






Inventory Ctl. 


$ 19.95 






TX/ZXASCOM 


S 24.95 






Shipping/Handling 


S4.95 


TOTAL ORDER 



Data-Assette has over 50 software programs in its library, and we are 
adding more each month. If you wish to see our catalogue or join our mail- 
ing list, just send S2.50 which will apply towards your first order. 
Information and product spec sheets may be obtained by mail, or phone our 
HOT-LINE 800-523-2909; in Penna 215-932-4807. 



PLEASE RUSH MY ORDER TO: 



Name. 



Address 



City 



.State. 



.Zip. 



Charge To: VISAD 

Account Number 

Expiration Date 

Signature 



Master □ 



Send to: Data-Assette |sy-3| 
56 South 3rd St. 
Oxford. Pa. 19363 



try thi 




4KR0M 

Type in the program listing below. 
Then RUN the program and watch the 
results. The program takes about 1 5 sec- 
onds to finish RUNning. Then try dif- 
ferent values for lines 50 and 70. The 
values 8 and 136 produce an interesting 
display. 

Our thanks to: 
Joseph Ho 
297 Gibson St. 
Fredericton, N.B. 
Canada E3 1 4E7 

10 FOR Y=-K> TO 10 

20 FOR X=-10 TO 10 

30 IF ABS(Y)=<ABS(Y) /2) *2 AND# 
ABS(XXABS<Y)+1 THEN GOTO 70 

40 IF AB3(X)=(ABS<X) /2) *2 AND* 
ABS<YXABS(X)+1 THEN GOTO 70 

50 PRINT CHR*(0) ; 

60 GOTO BO 

70 PRINT CHR*(128) ; 

80 NEXT X 

90 PRINT 
100 NEXT Y 



8KROM 

In this issue we have two little pro- 
grams that are similar in the results, but 
different in the method of achieving 
them. 

Type in the following line: 

1 REM V BOSUB X PRINT ■» LN 
P? LET U/- NEXT 

Graphics line note: 

1: 1, S 
Then type in: 

POKE 16517,71 
If you want to save this program, do it 
now because you will not be able to 
BREAK and save it after RUNNING. 
Then type in: 

RANDUSR 16514 
and observe the results. 
Our thanks to: 
Scott Laska 
2205 Calumet Drive 
New Holstein, WI 53061 



8KROM 

Type in the listing below. The REM 
statement must be entered exactly as 
shown. 
Line notes: 

1: TAN on the E key 
50: inverse space (22) 
80: A (12) 
After the program has been entered, 
hit SLOW and ENTER and then RUN 
and ENTER. Observe the results. To 
exit the program hold the M key down 
and hit the BREAK key. You can exit 
the program by just hitting the BREAK 
key, but the screen display will "fall 
apart." 
Our thanks to: 
Tom Jury 
415 W. Walnut St. 
Lancaster, PA 17603 



11 REM YBBBTON 
20 POKE 16516,237 
38 POKE 16517,71 
*B FOR Y=S TO 17 

"" RT Y,5; "| 



INT 

T , 



7a tor y=b to i* 
ea print rt y,ib; 

98 NEXT Y 
!0e LET L=U5R 16514. 

118 LET K=RND»29 

i§S poKl^ISfi;!?" ™ EN LET K = 3a 

i*e goto iae 



TS-1000 ZX 80/81 8K/16K 

FUN GAMES FROM 

Haymarket Software 

• All programs on cassette and fully documented 

• Easy to play by 1 or 2 players 

• Can be played against computer or another 
players 

• Playing boards are displayed 

• Educational & fun for all ages . . . 

********** 

"FLIP-FLOP" an interesting combination of 
Checkers, Othello, and Tic-Tac-Toe. 

5 levels of play $10.95 

"ZX-Black Hole" $10.95 

"ZX-Concentration $ 8.95 

+ $1.50 p&h. Florida resident +5% tax 

P.O. BOX 14026 * JACKSONVILLE, FLORIDA 32236 




LIGHT PEN UNDER $70 




Light Pen for ZX81 . Cassette included. 
Control Board for 8 devices 
Character Generator 
6K memory (Internal) 

mail to: 



$69.95 
$49.95 
$59.95 
$49.95 



fcj ZODEX 



ZODEX east hill, 
oakham, ma. 01068 



16 



November/December 1982 



A 

FEW 

WORDS 

about our 

KEYBOARDS 

We only sell kits 
because we feel that 
the best way to add a 
quality keyboard to your 
computer, is to remove the 
bottom and solder 16 wires to 
the circuit board. If you can brush 
your teeth unattended then you possess 
all the manual dexterity needed to do the 
job. Most keyboards on the market are 
similar and will abo require a little soldering 
If you can solder one end of a wire, you can 
assemble a kit. So, we only sell kits. 



J * UTTfff WMW WW 

■■■■■■■■■■■■ 



This keyboard was originally made for T.I. It has 62 

full-sized keys with gold contacts mounted to a 

metal plate 4" by 15.5". This is a quality 

keyboard and our manual wilbhow you 

how to make full use of all those keys. 

Keyboard with manual 
$37.50 



Our 
KEY- 
BOARD 
manual covers 
what you need 
to know about 
keyboards in general 
and shows how to wire 
them to your Sinclair or 
Timex computer. It includes 
circuits on how to use extra keys 
for Reset, Shift-lock, Auto-repeat, 
and other user-defined functions, plans 
for a 3 amp power supply that lets you 
run your computer and add-ons most any- 
where, including your car, and plans for a 
case with tape and/or module storage. If you 
decide to buy a keyboard later, you rrey deduct 



the price of the manual. 



B$ttw» 




The 
EPROM 
Programmer 
puts an end 
to cassette tape 
headaches by letting 
you store programs in 
ROM. Simply load a pro- 
gram, then your computer 
can store it in one or more 
2716 EPROM'S. The module holds 
four 271 6's, giving you 8K of ROM 
in the 8K to 1 6K slot. By using ZIF 
(zero insertion force) sockets, ROM's can 
be changed as easily as cassettes Programs 
load in seconds, not minutes; first time every- 
time Store permanent machine code subroutines, 
upper/lower case character set, math symbols, special 
graphics, tool-kits, de-buggers, etc. all without using RAM. 




Semi-kit; board, parts except EPROMs, plain 

sockets, manual. No case. $49.85 

Full-kit; Includes ZIF sockets and case 

Without EPROMs $74.45 

With EPROMs $94.45 

Wired and tested; Includes ZIF sockets 

Without EPROMs $86.95 

With EPROMs $106.95 

Bare-board; No manual $19.75 

Manual; $6.00 



VOLTAGE REGULATOR 



^ 



L M 32 3 K 

5 Volt 

3 Amp 

$3.95 



■■■■■■■■■■■■■■■a 



All prices postpaid U.S.A. only. In 
Canada add $2.00 for manuals or 
$5.00 for all other articals. All other 
countries add $4.00 for manuals or 
S10.00 for all other articals. U.S.A. 
funds only. Check,money order.VISA, 
Mastercharge. Phone orders accepted. 
Texas residents add 5% state sales tax 



The Synchronize system is designed to put 
maximum fun and utility in your hands at 
minimum cost. Manuals for our products may 
be purchased separatly, and are complete 
enough to build your own modules using 
your own parts. If you decide to buy a kit 
or wired module, the price of the manual 
may be deducted from the advertised price. 



SYN 
SYIY 
SYN 



»" 



P.O. Box 1667 
Kerrville, Tx. 78028 

1-512-896-1288 



2K GAMES PACK 



•M0WSTE8" 

•STAR 

•DRAGON 



THE FINANCIAL MANAGER 

AND RECORD KEEP 

16K 




I'S DESTROYER 2K 



S KIT 16K 
GRAPHICS KIT 16K I 

GRAPHICS KIT 16K i 



.... ■ .::::■■:■:■ :.. 



i ACMFi 






1 SPACE RAIDiMlB^ 

i 


BIORHYTHMS 16K 

ilMBMIIifllMlIlO^ inn..' 






...ft... 


^^H 


ALIEN INVASION 16K 


W '"* ^| 



PROGRAMMERS 
TOOLKfT 16k 

■\\iVK>rPl.'vct 



RED ALERT 16K 



THIS 




TH 1 

uq 


UflY 


• • 













l\/l A 7 ^"^ ^* ^ 


«£*■(» -T ■ ■ : - 1 ' : T' 1 






FHE STOCK MARKET 'CALCULATOR i6K 




UNCLE 
CLIVE 

T-SHIRT 


K*£lL 




±L 1 


^F if A 






METiOllVfIS 1 



MORE TS1000 /ZX8 1 SOFTWARE FROM ... 

iSOFTSYNC, IMC 

14 east 34 st N.Y N.Y. iAft1c 




WRITE FOR FREE CATALOG & PROGRAM LISTING 



Just Far Fun 



Generally SYNC prefers articles in some depth to help you get more out of your 
computer. However, we receive many short programs that illustrate a point, 
demonstrate a technique, or show something the reader has found interesting. 
"Just for Fun" shares these programs with you. If you learn something, great. If 
you have some fun, great. If you have some that you want to share, send them 
to: Just for Fun, SYNC. 39 E. Hanover Ave., Morris Plains, NJ 07950. 



Mousetrap 

M. Hampson 

In "Mousetrap" your objective is to 
trap the mouse which is represented by 
the O. Your position is shown by the $. 
By constantly decreasing the amount of 
space the mouse has to run in, you will 
finally trap it in a small enough space 
and win the game. You decrease the 
space by building walls with the arrow 
keys. While you can go off the sides, you 



TO ^0 

3 PRINT CHR5 3,TflB 31, CMP* 8 

4 NEXT Z 

5 PRINT 



16396 +256 »PEEK 
iRND*3B) +33* 
.5) *2> *SGN I 



6 LET U=1*PEEK 
16397 

7 LET >:■ .-V+34. + INT 
INT (RND-.20I 

8 LET D=(32*[RND) 
RND-.5I 

9 LET Q='J*4.3 
113 LET so=a 

J 9 LET R-O 

I LET A=fl+1 

-CI IF 1=1=9 THEN GOTO 3000 

102 IF PEEK (P+D.l THEN GOTO 900 

e 

105 POKE P,0 

110 LET P=P+D 

120 POKE P . 52 

200 IF PEEK 0O113 THEN POKE O, 

a 

210 IF INKEY*= -3" THEN LET O =6) + 
X 

211 IF INKEY*="S" THEN LET Q =0 - 

212 IF INKEY* = "<5" THEN LET O =0 + 
33 

213 IF INKEY$«"7" THEN LET Q=Q- 
33 

22B IF PEEK S>:,113 THEN POKE Q, 
13 

225 LET GO=GO+1 

230 GOTO 99 



cannot go off the top or bottom. Your 
score will be displayed in the upper right 
hand corner. The aim is to get the lowest 
score possible. 

Graphics line notes: 

1 and 5: A (32). 

8010: Inverse space (3), "GOT 
HIM. YOUR SCORE IS" in inverse 
characters, inverse space (2). 

M. Hampson, 7 Hereford Dr , Clitheroe, Lanes BB7 
UP, U.K. Reprinted from The Ultimate Magazine with 
permission. 

3O10 PRINT AT ,0, 

::O20 PRINT S00-GO, '«■■" 

PAUSE 50000 
3031 IF INKEY*="K" THEN GOTO 6 
3035 CL5 
"040 RUN 

3000 GOTO 950O+D+10 

9160 IF PEEK (P-33) =PEEK (P-l) T 
HEN LET D=34 
3161 IF PEEK (P-33) AND C<=-3* TH 

ET D =32 
HiS2 IF PEEK (P-l) AND D— 34. THE 
i LET D = -32 

3 GOTO 100 
9130 IF PEEK IP -331 =PEEK <P + 1) T 
HEN LET Da3S 

3131 IF PEEK (P-33) AND D = -32 TH 
EN LET D=34 

3 182 IF PEEK iP + 1) AND D=-32 THE 
I LET D = -34 

3 GOTO 100 

IF PEEK (P»33l =PEEK (P-l) T 
LET D = -32 
3921 IF PEEK (P+33) AND D =32 THE 
I LET D = -34 

9322 IF PEEK (P-l) BHD D =32 THEN 
LET D=34 

18 GOTO 100 

934.0 IF PEEK (P+33) =PEEK (P + l) T 
HEN LET D = -3* 

334.1 IF PEEK (P+33> AND D =34 THE 
i-ET D = -32 

9342 IF PEEK lP + 1) AND D =34. THEN 
_ET D=32 

: j GOTO 100 



Unvader 

M. Hampson 

You have all played various kinds of 
invader in which the ships are streaking 
in from above your base and you must 
defend yourself. Usually you are greatly 
outnumbered by a fleet of ships. 

Have you ever wanted to be on the 
other side? Now you have that opportu- 
nity. "Unvader" lets you play the game 
from the other side. You are the attacker 
coming in from the top of the screen, 
and the ZX81 is trying to shoot you 
down. 

Your mission is to land your ship 
safely on the hostile planet's surface. To 
do this you must dodge the shots aimed 
at you as you descend. Use the 5 key and 
the 8 key to move left or right and the 6 
key to descend. 

This program sets up the graphics for 
your ship, the ZX81's firing base, and 
the missiles can be seen. A hit on your 
ship is shown graphically. 

Graphics line notes: 

150: E, E, 5, R, R, 1, 6, W, 4. 
210: 5 

IB LET P = 1S 

20 LET 0=1 

30 LET R=P 

40 LET C=0 

50 LET B=C 

110 LET R=R+SGN (P-R) ♦ (RNO> . 5) 

120 LET P=P + iINKEY$='6"t * (P < >29 
) - (INKEY*="S") * (P< >0) 

130 LET" 0=0+ (INKEY*="6") 

140 CLS __ _ „ .._ 

150 PRINT JT 0,P,"m",TRB P; "H 
•»» ■; TUB P; "■ '".flT 2 i,R; ••«■»■•• 

180 IF S=19 THEN GOTO 300 

170 PRINT BT C,B;" 

180 LET C=C-1 

131 IF C>0 THEN GOTO 190 

182 LET B=R + 1 

183 LET C=20 

190 PRINT RT C,B; 

200 LET K=PEEK (PEEK 16398+256* 
PEEK 16399) 

201 IF K<>0 HNO K: .lie THEN SOT 
O 400 

210 PRINT "I" 
320 GOTO 100 

300 PRINT RT 10,10, "11SUCC£SS*« 

301 STOP 

400 PRINT RT 0+2,P-2; "•BOOM*" 




H 



November/December 1982 



19 



Draw and Store 

James John Hollandsworth 

Draw and Store not only allows you 
to draw a picture, but also to store your 
picture on tape for later use. When you 
have entered the program(or LOADed 
it), type in GOTO 1 and ENTER. The 
computer will ask if you want to draw 
the picture it has stored to be put on the 
screen or to erase and start a new 
picture. 

The direction keys are used to move 
the pixel around. Holding the shift key 
down while pressing the keys leaves a 
trail. 

When you want ot save a picture, hit 
ENTER and the display file will be 
PEEKed and put into a character array. 
SAVE the program and its array on 
tape. When you LOAD the tape later, 
you can also easily substitute your favor- 
ite drawing routine for the drawing rou- 
tine section of the program. 



James John Hollandsworth, Box 163, Monlcoal, WV 
25135. 



Program notes: 

1-80: The drawing routine. 

505-550: Loads the array with the 
contents of the display file. 

600-750: Reconstructs the picture 
from the character array. 
2KRAM 

1 REM UJH 1-31-82 

2 REM USE GOTO 1 
5 GOTO 600 

10 LET Y=0 

IS LET X=0 

2 PLOT X,Y 

2S PRUSE 40000 

30 POKE 164-37,255 

3S LET R=CODE IHKEY* 

4.0 IF H = 118 THEN GOTO 500 

5S IF R < 100 THEM UNPLOT X,Y 

60 LET X=X+1*(R=36 OR «=11S3* 
X<63> -1* (R=33 OR R = l 14. > * (X >0) 

70 LET Y=Y+l*iR=35 OR R=112)». 
Y ;4-3> -1* (R=3* OR R = 113)*(Y>0) 

80 GOTO 20 

505 FOR R=l TO 22 

510 FOR B=l TO 32 

520 LET fl*(R,B)=CHR» PEEK ((PES 
K 16396) +256* (PEEK 16397) +33* (R - 
1) +B> 

530 NEXT B 

54.0 NEXT ft 

550 STOP 

600 PRINT 
E" 

610 PRINT 

620 INPUT D* 

630 CLS 

64.0 IF D* = "N" THEN GOTO 700 

650 DIM fl« (22,32) 

660 GOTO 10 

700 FOR ft = l TO 22 

710 FOR B=l TO 32 

720 PRINT R«(R,B); 

730 NEXT B 

74.0 NEXT R 

750 GOTO 10 

IK RAM 

1 PLOT X,Y 

2 PRUSE 4.0000 

3 LET R=CODE INKEY« 

4. IF R<10O THEN UNPLOT X,Y 

5 LET X=XH»[B=36 OR Balls) » I 
X<*7> -It <fi=33 OR fl = 114. ) * C X >©) 

6 LET Y=Y+1*(R=35 OR Rilia) • l 
Y<37) -1» (fl«34. OR R=113)*(Y>0) 

7 GOTO 1 



'SK ROM DRRU R PICTUR 



'NEU PICTURE? 



OR N'- 



Number Nine 

Jon Passler 

The object of Number Nine is to over- 
write the digits to 9 in order without 
recrossing your path or exceeding the 
boundaries of the playing area. 

Enter line 1. Note that keywords are 
used to save memory. Do not type them 
in letter by letter. First enter 1 PAUSE, 
backspace, enter UNPLOT, and back- 
space agains, and enter REM. Proceed 
to enter the rest of the characters shown 
in the line. 

Graphic line notes: 
1:T, A, and 3. 
2 1 : graphics space. 
31: A. 
After entering the program, enter in 
the immediate mode, i.e., without a line 
number: 

LET R= 16514 
LET B= 156 
LET C= 165 
LETS=15 
LET 0=2 

LET K=1+PEEK 16396+256* 
PEEK 16397 

K will have to be reinitialized if any 
changes are made in the length of the 



Jon Passler, 344 Cabot St., Beverly, MA 01915. 



ZX81 



CLEVA computer ware 



TS1000 



ENTERTAINMENT PROGRAMS 



ORDER # 

CK161 SNAKEBITE 



BATTLE 



Eat the snake before it eats you. 
Variable speed. Create your 
own hazards. 

Demanding game of military 
strategy that can be played by 1 
to 4 players. 



CK162 STARSHIP TROJAN Pit your wits against the dan- 
gers of Outer-space and try to 
save your damaged space-craft. 

Face the monsters hiding in the 
underground complex to find 
the treasure and save the Prin- 
cess. 



PRINCESS OF 
KRAAL 



CK163 STARTRACK 



FUNGALOIDS 



Use graphic photon torpedo 
attacks to kill off the highly 
mobile Klingons. 

Save civilization by bombing 
the ever-multiplying fungus. 
Beware— it fights back. 



CK164 CRAZY-CARDS 



CUBE 



Learning the rules does not 
seem to help. Totally addictive 
for cheats. 

Use your computer to solve the 
mysteries of the Rubik Cube. 



TWO GAMES FOR THE PRICE OF ONE (ONLY $9.95) 
All PROGRAMS 16K 



MACHINE LANGUAGE PROGRAMS 

CK165 ASSEMBLER $9.95 

2 pass assembler written especially for the ZX81/ 
TS1000 (16K). It is simply the best assembler avail- 
able for those who wish to write their own 
machine code programs. It is designed to run 
alone, or together with the dis-assembler, and/or 
the de-bugging program. These provide a system 
for writing, editing, checking and testing machine 
code programs that is second to none. 

CK166 DIS-ASSEMBLER $9.95 

Allows you to read the ZX81/TS1000 ROM (16K) 
with the best dis-assembler program available. It is 
written specificafly for Sinclair/Timex computers, 
and unlike some programs modified from Intel 
8080 dis-assemblers it gives full Z80 Mnemonics. 

CK167 DE-BUGGER $9.95 

Makes writing machine code programs easier. 
Works entirely in decimal. Therefore hexadecimal 
is not needed. (16K) 



Please send check or money order. NO CASH! 
New York Residents only add 8'/<% Sales Tax. 
SHIPPING AND HANDLING 
Add $1.50 for first item and $.50 cents for each additional item. 

Name 

Address 

City. state Zip 



Mail To: CLEVA Computer Ware 
P.O. Box 2736 
Brooklyn, NY 11202 (212) 875-1207 



20 



SYNC Magazine 




take the HARD WORK out of SOFTWARE! 



Level 



n Basic " )l 



COOK 

TransCoder I 



K 



Timex/Sinclair Basic 




FROM COOK LABS — #1 IN CASSETTE SOFTWARE DUPLICATION 

• Translate and/or edit T/S or ZX-81 the fast, easy way. 

• Save 75% or more of valuable programming time. 

• RAM-to-RAM dialogue shuttles back and forth at machine 

speed — faster than disc. 

• Meet the huge oncoming T/S software market by: 

1) translating Level II libraries automatically; 

2) writing and editing in either Level II or 
Sinclair Basic on a conventional keyboard. 

The TransCoder I comprises a combination of software and hardware. 
The hardware holds an 11 -chip board that plugs directly into the expansion 
port of a R/S Model I or Model III ( 32K min. ) . The several K bytes of machine 
software reside in R/S high memory. 

The excellent editing facilities of the host R/S computer directly apply to 
editing of T/S Basic programs because the T/S Basic listing will appear on the 
screen of the R/S monitor. 

Translation of Level II Basic program listings into T/S Basic is accom- 
plished and displayed through software on command, with directly untrans- 
latable statements flagged for the programmer's attention. Programs can then 
be shuttled to T/S for final debugging and to check displays on the T/S screen. 

Communication between the Radio Shack and the Timex/Sinclair oper- 
ates in either direction and is non-destructive of the sending source. When com- 
pleted, programs in T/S Basic can be filed on R/S disc or tape for safety and 
convenient reference. 

The complete TransCoder I package — hardware, software, manual — is 
priced at only $490,* and will be available in early October. Orders will be filled 
in sequence as received. Please write or phone if you need more information. 

•Subject lo change without notice. 

COOK LABORATORIES, INC. 

P.O. Box 529 

Norwalk, CT 06856 (Phone 203-853-3641) SAME 

□ Send TransCoder I to address 
given at right. I enclose check 
or M.O. for $500 which includes 
$10 for handling & shipping (Conn, 
residents please add sales tax) . 

□ Send information about COOK 
software duplication services. 



COMPANY- 
ADDRESS— 



_ZIP_ 




1 REM ^»YM. =NOT »4 UNPUOT YU . 
MOT ( PRU5E TRN 

3 RRNO USR R 

5 FOR R-B TO C 

7 PRINT RT RND»5*0,RND«5tO, CM 
R* R 

9 NEXT R 

IX UET X.NOT PI 

13 LET Y«X 

15 FOR fl=B TO C 

17 PRINT RT X.Y;CHR* R 

19 UET I«-INKEY» 

31 PRINT RT X.Y; "■" 

as if i»<-i- 6r rj>"M- then go 

TO S+O 

as UET X.X + (I*. "M") -<!»=." I"l 

37 UET Y=Y+ CI§. "K") - <I«»"J"> 

89 UET U=K«-X*21+Y 

31 IF PEEK L=CODE "■" THEN OOT 

S+O 

33 IF PEEK l-=R THEN NEXT R 

35 IF R>C THEN POKE L , CODE "U" 



program. Once the variables have been 
entered, (do not enter) CLEAR or RUN 
or they will be erased. Use GOTO 1 to 
"run" the program. 

Use the I, J, K, and M keys to move 
the flashing black character at print po- 
sition O.O. This is the character to use 
in overwriting the digits to9, and it 
should alternate between being an in- 
verse space and an inverse representa- 
tion of the next digit to be overwritten. 
Before starting however, make sure all 
digits ) to 9 are on the gray field and that 
none got overwritten by another. If you 
successfully overwrite to 9 then you 
will be rewarded with a W to indicate a 
win. If you are not successful, the pro- 
gram will end with a 0/35 error 
message. 

Eliminator 

Sheldon Maloff 

In Eliminator the object is to maneu- 
ver your spaceship to eliminate as many 
stars as possible by running over them. 

The stars are indicated on the screen 
by the asterisk. Your ship's view screen 
will display a constellation of eight stars. 
Your space ship is moved down by the A 



key and up the L key. You have 10 
chances to cross the screen. On each pas- 
sage you try to eliminate as many of the 
stars as possible. Upon each crossing, 
your score is updated to reflect how 
many stars you have eliminated and 
eight new stars appear. 
Graphics notes: 
2: inverse space 

Sheldon Maloff. 102-432 Hunlsville Cres., N.W., Cal- 
gary, Alberta, Canada T2K 5E1. 



1 FOR Z=SGN PI TO onu "asB" 

2 PRINT "■".: 

3 NEXT Z 

4 UET P=PEEK URL " 16396" +URU 
'2S6"*PEEK URL "16397" 

3 UET S=NOT PI 

6 UET R=UflU "133"+P 

7 FOR T»SGN PI TO UftU "10" 

8 I' OR Z-SGN PI TO URU "8" 

9 UET X=RND*URU "263"tSON PI+ 
p 

10 IF PEEK X=URL "118" THEN GO 
TO URU "9" 

11 POKE X.URL "151'' 
18 NEXT Z 

13 FOR 2=SGN PI TO URL "31" 
1* IF PEEK (R*2)=URL "151" THE 
N UET S=S+5GN PI 

15 POKE R«-Z.. URL 

16 POKE R+Z. URU 

17 IF INKEY*="»" 
URL "33" 

18 IF R>=URL "264' 
^=r -UPL "33" 

19 IF INKEY*="L" THEN LET R-R- 
URL "33" 

20 IF R<=P THEN UET R=R+URU "3 



•146" 
•128" 
THEN UET R-R+ 

»-P THEN UET 



3" 



21 NEXT Z 

22 PRINT RT SGN PI..SGN PI.: 5 

23 NEXT T 




PRICES: 

Baby BBU — 39.50 
BBU-1 — 54.50 
BBU-2 — 84.50 








EVEN IF YOUR LIGHTS GO OUT 
YOUR COMPUTER WON'T 

Introducing 

NiCd Battery Back-Up Units from Syncware 

• Make your ZX Portable 
BBU-2 runs over 2 hr. 
BBU-1 runs 1 hr. 
Baby BBU runs Vahr. 

■ Make your ZX immune 
to line glitches! 

• Protection against 
brown-outs, blown 
fuses, etc. 

Now Available — TSlOOO's 
with built-in battery back-up 
and LED power indicators. 

TS-1000-B30- 

30 min. backup $129.50 

TS-1000-B60- 

60 min. backup $142.50 



TIRED OF LINE GLITCHES 

GIVING YOUR COMPUTER AMNESIA? 

Let Syncware take the annoyance out of computing. Baby BBU and BBU-1 use ex- 
istmg power supply; in case AC line goes dead or power supply gets knocked out 

Jrf ??^ ba " ery tak6S 0Ver until P° wer r estored M prevent^Vmemory Toss 
BBU-2 contains built-in heavy duty power supply, 
eliminating need for original supply. In addition, 
BBU-2s output is pre-regulated at 8 volts for addi- 
tional glitch rejection, and also lets your ZX run con- 
siderably cooler. DON'T WAIT FOR A SUDDEN 
CRASH BEFORE YOU ORDER YOURS' PO 



Prices are postpaid in continental 
U. S. Foreign orders — add $5. OO. 
Payment must be in U. S. cur- 
rency. Send check, money order or 
international M. O. only. 

SvNCUHRiE co 

BOX 5177, EL MONTE, CA 91734 





KAYDE Electronic Systems 

ZX80/1 

ZX KEYBOARD WITH 

REPEAT KEY 



Fully cased keyboard $75.90 

Uncased keyboard $55.90 

Keyboard Case $21.90 

This is a highly professional keyboard using executive buttons as found on top quality 
computers It has a repeat key and comes complete in its own luxury case this is a 
genuine professional keyboard and should not be confused with toy keyboards currently 
available on the market 

KAYDE 16K RAM PACKS 

The 16K RAMPACK simply plugs straight into the user port at the rear of your computer It is fully 
compatible with all accessories and needs no extra power and therefore it will run quite happily on your 
Sinclair power supply It does not over-heal and will not lose memory at all As you may know some 
makes go down to 1 1 K after being on for a while 

This 16K RAMPACK is very stable and will not wobble or cause you to lose your programme It comes 
fully built and tested with a complete money-back Guarantee 

KAYDE FLEXIBLE RIBBON CONNECTOR 

Stops movement of RAM PACK and other accessories 
(Not needed with a KAYDE RAMPACK) 

KAYDE 4K GRAPHICS BOARD 

The KAYDE Graphics Board is probably our best accessory yet It fits neatly inside your ZX81. It 
comes complete with a pre-programmed 2K Graphics ROM This will give nearly 450 extra graphics 
and with the inversp m,ikps a total of over nine hundred 

The KAYDE Graphics Board has facilities for either 2K of RAM (tor user definable graphics). 4K of ROM 
or our 4K Tool Kit Chips that will be available shortly All the graphics are completely software 
controlled, therefore Ihey can be written into your programmes Here are a few examples A full set ot 
space invaders — PucKman — Bullets, Bombs — Tanks — Laser Bases and Allen Ships. 

NO EXTRA POWER NEEDED 

KAYDE 16K GRAPHICS BOARD SOFTWARE 

PECKMAN The only true ZX version of the popular arcade game 

Centipede In all I think this is the best presented moving graphics program I've yet seen Phil Garratt 

Interlace 

SPACE INVADERS The best version available anywhere Graphics software can only be used with a graphics board 

KAYDE 16K 81 SOFTWARE 

Centipede "In all I Ihmk this is the best presented moving graphics program Ivetjet seen Phil Garratt. 

Interlace 

3D'3D Labyrinth A Cubit Maze that has corridors which may go led. right, up. down Peckman (the 

latest addition in 81 games! 

WHY WAIT TO PAY MORE — 
FAST, IMMEDIATE DELIVERY 




VvyxA' 




Post to: Dept SY-3 

Kayde Electronic Systems Ltd 

The Conge 

Great Yarmouth 

Norfolk NR30 1 PJ ENGLAND 

Tel 0493 57867 (Dept. SY1) 

Please pay by 

International money order or certified 

cheque for immediate delivery. 



Pluu send ma ZX Keyboards with repeat key »'=>90each 

Please send ma 16K RAMPACKS $59.90 „ C h 

Please send ma Flexible ribbon connectors $25.90 each 

Pleaae send me 4K graphics boards $59.90 each 

Please send ma 16K graphics board software $11.90 each 

Pleas* send me 18K 81 software $1 1 .90 each 

I enclose , 

Name . 



Aridross 



Please add $5 p&p for all hardware and $2 for all software Please make 
cheques payable to Kayde Electronic Systems Ltd 



i 



I 



i 



FULLER MICRO SYSTEMS ADD STYLE, POWER, VERSATILITY 
AND FULL TYPEWRITER KEYBOARD OPERATION TO THE 
AMAZING ZX81 COMPUTER! __— -— -^^^ 



THE FULLER FD42 SYSTEM 

The ideal Christmas Gift for 
ZX81 users. 

If you already are the proud owner of the fastest selling small computer in 

the U.S.. or maybe have a friend or member of the family who's a ZX 

fanatic, what better buy is there this Christmas than the famous Fuller FD42 

System! It converts your ZX81 into a sturdy, attractive and professional unit. 

with full sized typewriter keyboard. All the Sinclair 

ZX81 keys are duplicated with extra shift and 

new line keys. The professional momentary 

action key switches have a guaranteed life 

of 10 operations, and the whole unit 

comes to you complete with a money 

back guarantee. 

IT'S EVEN CHEAPER IN 

KIT FORM! m '■ ( ' ZTTTT V^ T" -7%s<-»4 

FD 42 keyboard and case kt jUrT^ Lj^ 'j ''^ ZjLMtWM 1 I UTfl yOUT ZaOI 

$67 9S +S6p&p. 

FD 42 keyboard kit 



$37 



95 



+ S4 p& p. 




^W 



from this to this 



for...V *" 



*ft 



IT'S SO EASY 
TO INSTALL! 

You simply unscrew the ZX 
printed circuit board from 
its base, screw it into the 
the new FD case, and 
plug in the keyboard. No 
soldering or technical 
knowledge required. 



ZX81 MOTHERBOARD 

Also easy to install! The FD system Motherboard fits 
inside the Fuller case and allows expansion to the ZX 
memory and 1/0 facilities «t»o^oc 
2 slot PoU' + S4 p& p. 

3 slot $39 95 




FULLER MEMORY EXPANSION 

a massive boost for your ZX81 ! 

The basic ZX81 has only 1 k of RAM - now you can 
add on an enormous 16 or 64k with our FD Memory 

™r: $49 9s 

+ 54 p& p. 

_$59 95 

+ S4 p& p. 

$129 95 

+ S4 p&p 



FDl6k to fit inside Fuller case 



FD64k Memory Module. 



Please supply the following items: 



+ $4 p&p. 

NEW! - Programmable Sound 

OenerafOf- adds exciting new ■».»*» 

sounds to the ZX81 range $39 9S +S4p& P . 

Separate P.S.U. 9 volts @ 2 amps $1 4 95 +S4p&p. 

Plug Planner- complete with 3 metres 



of cable and power jack 



$36' 



Ram Adaptor Board - adapts Sinclair RAM „ 

pack to fit inside Fuller case $19 95 



+ S6p« p. 



+ S4 p&p. 



MICRO 
SYSTEMS 




Mail to: FULL MICRO SYSTEMS, 

The ZX Centre, Sweeting Street, Liverpool 2. 
England U.K. Telephone: 051-236 6109 



ITEM 


PRICEt 


Oty 


TOTAL 


Fuller FD System 42 Keyboard & case 








Fuller FD System 42 (Kit form) 








Fuller FD System Motherboard 








Fuller FD 1 6K. Memory Module 








Fuller 64 K. Memory Module 








Sound Generator 








FD PSU 9 Volts at 2 amp 








Fuller FD Shipping and Handling 














AD CODE 



Mail to FULLER MICRO SYSTEMS, 

The ZX Centre, Sweeting Street, Liverpool 2. 
England U.K 

Name / ■ 

Address rm 

City /State/Zip @rf ■ 

t US Dollars SY.12.82 /) M 



SK ROM 
2KRAM 



Turtle Graphics 

Morgan Woodson 



Introduction 

Have you ever wished for an easier 
way to create graphics displays on your 
Sinclair computer? You can always use a 
line drawing program and a table of coor- 
dinates, but setting up the table can be 
tedious. The LOGO language, developed 
by the artificial intelligence group at MIT, 
has a graphics system called Turtle 
Graphics which might make your wish 
come true. 

Turtle Graphics is named for the 
"turtle" robot originally used to draw the 
figures. It was equipped with a pen in 
addition to motors to move it. When 
graphics displays became economically 
and technically feasible, they were used. 
Since this system offers some interesting 
graphics possibilities, I decided to see how 
it might be done on the Sinclair 
computers. 

Let us begin by imagining our turtle 
and assign four attributes to it: an x posi- 
tion, a y position, an angle (in degrees), 
and a pen up or down (see Table 1). We 
will guide our turtle by using five com- 
mands. FORWARD n moves the turtle n 
spaces forward in the direction of the 
angle it is pointing. RIGHT n and LEFT 
n change the direction that the turtle is 
facing n degrees, but do not move it. UP 
and DOWN move the "pen" into a draw 
or no-draw condition. 

Implementing Turtle Graphics 

The first problem in implementing Tur- 
tle Graphics on a Timex/Sinclair com- 
puter is determining the new x and y 
coordinates after a FORWARD n com- 
mand. The RIGHT n and LEFT n com- 
mands are easy. All that we have to do is 
add or subtract the n values from the 
turtle angle. The UP and DOWN com- 
mands are even easier because executing 
them consists of changing a flag. 

Morgan Woodson, 39 Winter St., Wakefield. RI 
02879. 




To figure out how to move the turtle, I 
drew a right triangle with the distance to 
travel forward as the hypotenuse (see 
Figure 1). This requires some simple trig- 
onometry (see Figure 2). The new x coor- 
dinate was the old one plus the cosine of 
the turtle angle times the distance to 
travel. The y coordinate uses the same 
formula except that the sine of the turtle 
angle is used. 

The next step was to write the program. 
I put it in the form of a subroutine to 
make it more convenient to use. The 
commands are stored in a string variable 
(AS) before calling the turtle routine. The 



graphics commands are reduced to single 
letters to simplify the string splitting part 
of the subroutine (see Table 2). 

Connecting the new point to the old 
was initially done by means of a line 
drawing subroutine from the ZX81 
manual. Since the ZX81 uses radians 
instead of degrees, the degrees have to be 
changed to radians. At first I made the 
change when the RIGHT and LEFT com- 
mands were executed; however, to save 
memory, I changed to program so that 
the turtle angle was in degrees and not 
changed to radians until the FORWARD 
command was executed. 



Table 1. List of Variables and Functions. 



Variable Function 

AS Turtle Graphics commands and arguments. 

B$ Current command 

X Turtle x coordinate 

Y Turtle y coordinate 

A Turtle angle in degrees 

P Turtle pen condition 

I Loop variable and position of next command in AS 

D Argument for Turtle command 

R Turtle angle in radians 

J Another loop variable 

C Cosine of Turtle angle 

S Sine of Turtle angle. 



. Table 2. List of Commands and Functions. 



Command 


Abbreviation 


FORWARD n 


Fn 


RIGHT n 


Rn 


LEFTn 


Ln 


UPn 


Un 


DOWNn 


Dn 



Function 

Moves Turtle forward n spaces 

Turns Turtle right n degrees 

Turns Turtle left n degrees 

Makes Turtle not draw (argument has no effect) 

Makes Turtle draw (argument has no effect) 



November/December 1982 



25 



Then when the program worked, I 
removed the line drawing routine. Instead 
of moving the whole distance in one jump 
and drawing a line between points, the 
program moves one unit at a time and 
plots each point. This produces the same 
effect, but it is much shorter. 

The last change requires an argument 
for UP and DOWN to simplify the string 
splitting routine. The argument has no 
effect. 



The driver routine (see Listing 1) sets 
up the initial position, heading, and pen 
position of the turtle, gets a command 
line and executes it, then gets another 
command line. To exit this routine, type 
ENTER (with no command) to get an 
error. 

The subroutine has the following main 
steps: 1) it puts the first command of the 
command line into another string; 2) it 
searches for the next command and puts 



Figure 1. Turtle Triangle. 



New (x,y) 




Old (x,y) 



Adjacent side 



Figure 2. Computations. 



DY Vertical distance to travel (unknown) 

DX Horizontal distance to travel (unknown) 

D Distance to travel (known) 

A Turtle angle (known) 

X Turtle X coordinate (known) 

Y Turtle Y coordinate (known) 

New X Turtle X coordinate after movement 

New Y Turtle Y coordinate after movement 



(unknown) 
(unknown) 



To find the horizontal distance: 

CosA= Adjacent 

Hypotenuse 

CosA= ^X- 

Cos A*D=DX 

To find the vertical distance: 

Sin A- QPP osite 

Hypotenuse 



s-A-gZ 



Sin A*D=DY 

To find the new x and y coordinates: 

New X=X DX 
NewX=XCos A*D 
New Y=YDY 
NewY=YSinA*D 



the argument into the variable "D"; 3) it 
executes the command by going to the 
FORWARD routine (line 600) or chang- 
ing a variable; 4) the command and argu- 
ment just executed are deleted and, if 
there is more on the line, it is executed. 

The FORWARD routine first converts 
the turtle angle from degrees to radians. 
Next the cosine and sine of the angle are 
calculated. Originally, they were in the 
loop that draws the path of the turtle. 
Putting them before the loop greatly re- 
duced computing time. The loop finds 
the new x and y coordinates and plots 
them if the "pen" is down. Lastly, the 
routine jumps to the part of the turtle 
subroutine that decides whether to 
RETURN or continue executing turtle 
commands. 

Using the Program 

To use the program, type both parts in. 
Then hit RUN and ENTER. The screen 
will be blank except for a cursor waiting 
for a string. Type "F10" and ENTER. 
The screen will go blank and then reap- 
pear with a line from the center of the 
screen toward the right edge of the 
screen. This is because the turtle was 
facing to the right and you instructed it to 
move forward 10 spaces in that direction. 
Now type "R90 F10". This time another 
line will appear, perpendicular to the first 
line. The turtle has made a right turn and 
has gone forward again. Now type "R90 
F10 R90 F10". A square will now appear 
on the screen. This repetition of turning 
and moving can produce all kinds of 
polygons easily. Going right 144 degrees 
and forward 10 spaces five times will 
produce a five point star. 

You can continue to play around with 
turtle graphics using the driver program 
supplied, or you can use the subroutine in 
your programs to produce more complex 
figures. ^ 

Listing 1. Turtle Graphics Driver. 



1 REM TURTISE GRAPHICS ORIUER 

8 LET P=l 

5 LET R=0 

10 LET X-32 

2B LET YeS2 

30 INPUT Rt 

40 GOSUB 500 

50 GOTO 30 



Listing 2. Turtle Graphics Subroutine. 



500 
INE 
510 
530 
540 
5S0 
560 
565 
567 
570 
570 
580 
585 
590 

sos 

600 
60S 
605 
610 
6S0 
630 
640 
650 
S60 



REM TURTLE GRAPHICS 5UBROUT 

LET B»=R*ll) 

FOR I=fi TO LEN H* 

IF R* (!)=■■ " THEN OOTO 560 

NEXT I 

R» (S TO 1-1) 

THEN GOTO 600 

THEN LET P=B 



LET D=URL 
IF B«="F" 
IF B*="U" 
IF B»-"R" THEN LET R-R-D 



IF B»="D" THEN LET P=l 

IF B*="L" THEN LET R=R+D 

LET R*=R*CI+1 TO 1 

IF R»="" THEN RETURN 

GOTO S00 

LET R=fl/S7.896 

LET C=COS R 

LET S=SIN R 

FOR U=l TO D 

LET X=X+C 

LET Y=Y+S 

IF P THEN PLOT X,Y 

NEXT J 

GOTO SB5 



26 



SYNC Magazine 




All ZX81 owners can now load/save a full 16K in only 29 seconds with the incredible QSAVE hardware/software 
combination package from PSS. 



KAIPMOMl SOCKKT 




q 


SINCLAIR 
ZXB1 


C 






O D D O O O 

O O D Q D 

O O O O 











Just look at these features: 

1 . No hardware modifications are needed 

2. No extra power supply is needed 

3. QSAVE is compatible with your existing tape recorder 

4. QSAVE includes a verify feature to ensure successful saving 

5. No more wasted time waiting for programs to load or save 

MOST IMPORTANT OF ALL— QSAVE IS EASY TO USE— SIMPLY PLUG THE QSAVE AMPLIFIER/FILTER UNIT 
BETWEEN YOUR RECORDER AND THE ZX81 (all leads are supplied) — THEN LOAD THE QSAVE SOFTWARE 
BEFORE YOU LOAD A TAPE OR KEY IN A PROGRAM. YOU CAN NOW SAVE AND RELOAD A FULL 16K IN 
ONLY 29 SECONDS — ie. A DATA TRANSFER RATE OF 4000+ BAUD COMPARED WITH ONLY 250 ON THE 
STANDARD ZX81. 

1 6K/64K VERSION — Please state version when ordering 

REVOLUTIONIZE YOUR PROGRAMMING NOW FOR THE ALL INCLUSIVE PRICE OF ONLY $37.50. 







EVER WANTED TO WRITE MACHINE CODE PROGRAMS? NOW YOU CAN 

THE FIRST REAL MACHINE CODE COMPILER FOR THE ZX81 

SIMPLY WRITE YOUR PROGRAM IN BASIC (OR LOAD AN EXISTING PROGRAM), PRESS A KEY AND M 
CODER WILL AUTOMATICALLY COMPILE IT INTO MACHINE CODE. 

M CODER HANDLES 99.9% OF ALL BASIC 

ONCE USED YOU'LL NEVER WRITE BASIC PROGRAMS AGAIN 

GIVE ALL YOUR PROGRAMS THAT SUPER-FAST PROFESSIONAL LOOK WITH M CODER 

BUY M CODER NOW AND REVOLUTIONIZE YOUR PROGRAMMING FOR THE ALL INCLUSIVE PRICE OF 
ONLY £7.95 



Ever wanted to write machine code 
programs? Now you can. The First real 
machine code compiler for the ZX81 



Send check or money order to: 

00 O Personal Software Services 

1 OO 482 Stoney Stanton Rd. 

Coventry CV6 5FE U.K. 
Telephone Coventry (0203) 667556 

Name 



Address 



City/State 



Zip 



/ 



Now available in the US. at the 
incredible price of only $119.95 (£62.95) 



ACTUAL SIZE 3" x 2" 




THE 64K RAM PACK 



Fully built, tested and guaranteed. 

No additional power supply required. 

Black plastic case no larger than 16K 

RAM PACK. 

No wobble problems 

Fully compatible with printer etc. 



The 


use of this memory is as follows:- 


- 


8K 


Sinclair ROM 


8 - 


- 16K 


RAM that is unaffected by 
NEW, LOAD, SAVE and can 
be used for storing machine 
code routines. 


16 - 


- 32K 


BASIC Code, Display file, 
Variables, Machine Code 


32 - 


- 64K 


Variables 




16K RAM PACK at only $49.95 (£29.95) 

including FREE ALIEN ATTACK (7K -M/code) - value $11.00 (£5.75) 

As reviewed in 'Your Computer' - (March 1982) the leading 

U.K. Sinclair Publication. Almost 10.000 units sold in the U.K. so far. 

THE NO FRILLS' ECONO TECH 16K RAM PACK ONLY $39.95 (£20.95) 

We believe the Econo Tech is the lowest priced 16K RAM available anywhere. 
No frills - just a reliable and economical way to expand your ZX81. 
As reviewed in 'ZX Computing' August/Sept 1982, the new U.K. 
ZX computer publication. Available ONLY from JRS. 

PLEASE N 

RS SOFTV 
patch nori i ■ : 





f t 
I i 
I _ 



19 WAYSIDE AVENUE, WORTHING, SUSSEX, ENGLAND, BN 13 3JU Telephone: (0903) 65691 



Curve-plotting Graphics 



Richard Booth 



4KR0M 
IK RAM 



Curve-plotting has many applications. 
For example, an oscilloscope is a curve- 
plotting device which allows the user to 
view time-varying voltages. This article 
presents a program which allows the 
Timex/Sinclair computers to be used as 
curve-plotting devices. The common rep- 
resentations of curves possible with this 
program include the following: Cartesian, 
Cartesian Parametric, polar, and polar 
parametric. An example of a polar plot 
would be the radiation pattern of an 
antenna. The program requires the 8K 
ROM and makes use of pixel graphics. 

An Introduction to Curves 

A plane curve is a two-dimensional path 
or set of points. Plane curves are found in 
such everyday places as the path followed 



by an ant on the kitchen floor or a maga- 
zine article on inflation. They can also be 
found in special places such as an oscillo- 
scope trace or the spirals of a sunflower. 
A plane curve can be described mathe- 
matically in various ways. A description 
which is adquate must be useful for the 
particular application at hand. For 
example, if the application is target shoot- 
ing, it is only necessary to know whether 
a given trajectory passes through the 
bull's-eye. Since the application addressed 
in this article is curve-plotting using the 
ZX81, an adequate description would tell 
which pixels the curve passes through. 



This description will be used to construct 
a display file which in turn will be used to 
display the plot of the curve. 

Many curves can be described most 
concisely by the use of one or more 
equations. The equations can then be 
used to generate points of the curve. The 
curve-plotting program in this article op- 
erates by creating levels of descriptions 
of the curve as shown in Figure 1. 

A point is located with respect to some 
reference system. There are no require- 
ments upon the position or scale of the 
reference system itself so a convenient 
location and scale may be chosen. A 
Cartesian reference system is an X-Y axis. 
A polar reference system is a ray. In the 
Cartesian reference system a point is de- 
scribed by the coordinates (X,Y) of X 



.Figure 1. Levels of curve descriptions generated by curve-plotting program. 

Q 



Equations 



CART. 



CART.PARA. 



POLAR 



POLAR 
PARA. 



User input 



Polar Coords (R, 91 



Cartesian Coords (X.Y) 



Pixel Coords 



Display File 



Richard Booth, 12875 Highland Rd.. Highland. 
MD 20777. 



Plot 



Sweep 

• independent 
variable 



Polar to 
~ Cartesian 
conversion 

- Roundoff, 
scaling 

■ Plot command 

Internal 
. monitor 
subroutine 



November/December 1982 



29 



and Y intercepts. In a polar reference 
system, a point is described by the coor- 
dinates (R, 6 ),where R is the length of 
the line segment between the base of the 
ray to the point and (theta) is the angle 
between the line segment and the ray. 
Figure 2 shows the plot of a curve con- 
taining the point 

(R P 0p) 

The positive X-axis of a Cartesian refer- 
ence system coincides with the polar ref- 
erence system. In this Cartesian reference 
system the point is described by 

(X p ,Y p ) = (R p cose p ,R p sine p ) 

The curve-plotting program converts 
polar coordinates to Cartesian coordi- 
nates in this way to make use of the pixel 
graphics. 

The methods used by the program to 
generate point coordinates make use of 
functional equations. A functional equa- 
tion is one which evaluates some variable 
uniquely when the independent variable 
is given. This is expressed 

V D = f(V, ) 

where Vd is the dependent variable and 
Vi is the independent variable. 

The four approaches are best summar- 
ized in tabular form. See Figure 3. 

To generate point coordiates, the inde- 



pendent variable is swept through a range 
of values and coordinates are calculated 
for values in the range. 

Each type of description has its own 
advantages. For example, to generate a 
plot of a circle would take two sweeps of 
the independent variable using the 
Cartesian method, but only one sweep 
using the Cartesian parametric or polar 
methods. 

Program Description 

The program is listed in Figure 4. Lines 
10-220 are used to input equations, plot- 
ting window, etc. Lines 220-350 generate 
the plot. Note that expressions are entered 
as string variables so that no program 
lines need to be changed for different 
plottings. 

Also note in line 340 how points are 
scaled to pixel coordinates. Lines 300-330 
remove points which are outside the plot- 
ting window. 

Line 230 provides for 200 iterations of 
the FOR-NEXT loop. The number of 
iterations can, of course, be changed 
when necessary. 



Program Use 

The program first prompts the user with 
"CART., CART.PARA., POLAR, OR 
POLAR PARA.? (1,2,3, OR 4)". Enter 
the number corresponding to the plot you 
want. For example, for Cartesian plots, 
enter 1. Next, a plotting window is 
entered. This is the expected region which 
will be covered in Cartesian space. See 
Figure 5. 

If CART.PARA., POLAR, or POLAR 
PARA, was selected, a range must be 
entered for the parameter T or for theta, 
for example, an expression like PI/2. 

When entering expressions for X, Y, R 
or theta, be sure to use expressions of the 
appropriate independent variable: For 
Cartesian plots use X; for all the others 
use T. Be careful when using expressions 
involving powers, since powers of nega- 
tive numbers are not valid on the 
ZX80/81. For example, when X is nega- 
tive, use X*X instead of X**2. 

Sample Curves 

To illustrate the program, several inter- 
esting curves may be used. Two examples 
of each of the following types are given. 
The reader can get further variety by 
changing the constants. Many more exam- 
ples of curves can be found in A Catalog 
of Special Plane Curves by J. Dennis 
Lawrence (Dover Publications, 1972). 



. Figure 2. Cartesian and polar representations of a point. 



Figure 4. Curve-plotting program listing. 



Curve 




X p =R P COSOp 



20 PRINT "CBRT. , CRRT. PRRR . .. 
POLP.R . OR PO'.RR PRRR.7 (1.3.3.. O 
R 4.) " 



30 


INPUT Z 


4.0 


PRINT "PLOTTING UINDOUt " 


50 


PRINT " INPUT XMIN.. XMRX..YMI 


N .YMP.X" 


60 


INPUT R 


70 


INPUT B 


S0 


INPUT C 


90 


INPUT D 


100 


LET E = R 


110 


LET F=B 


120 


IF Z = l THEN GOTO 2O0 


133 


PRINT '•PRRRMETER.-THETR RflNQ 


14.0 


PRINT " INPUT MIN.MRX" 


158 


INPUT E 


160 


INPUT F 



170 IF 2=3 THEN GOTO 200 

1S0 PRINT " INPUT X/THETB EXPRE 

190 INPUT R« 

200 PRINT • INPUT V /ft EXPESSION 



310 
220 
230 
24.0 
250 

L R« 
260 
270 
275 
280 
290 
300 
310 
320 
330 
340 

0/ (D 
350 



INPUT B* 

CLS 

FOR T=E TO F STEP (F-E) /2O0 

IF 1 Z=5 OR Z = 4 THEN LET X=UR 

LET Y=URL B* 

IF Z<3 THEN GOTO 300 

LET U=X 

LET X=Y*COS U 

LET Y=Y*SIN U 

IF X<& THEN LET X=R 

IF X>B THEN LET X =B 

IF Y<C THEN LET Y »C 

IF Y>D THEN LET Y=D 

PLOT (X-P<> *60.'(B-R) .. (Y-CJ *4 

NEXT T 



30 



SYNC Magazine 



Make Your Sinclair 
fflf Hatdet, Better... 

^ —.*.*- Network ^ 



The Interface 

interface that letsv" j wor id. 

communicate w.ththe o u « iWe ,, o 

^ e a r aireriSpois-ed P todes lg n 

^"\^o conttol home lights, power 
circuits to contn > accept 

relays and addmonal £ and memory 
printer, mass storage u 
expansion. 

$79 9 w 5 hen 



'69when P«cha.ed 



New! The CAU ^ V a lpha-numerics 
Ubrary of regular an -^ width. Three 
and graphics m ^P 111 ™ f Qf 

user-addressable modes pn m 

enhanced Rouble tvpes^ i , ftom 

from memory, print text 
program, print screen 
$139 95 



Computer Network 

conversion program^ P^ e ucan 
^nS"w^g^ Sm e rsand 

Source )• nackaee when 

n49 95 rr.r»c^-- , 

$ 24 95 for ASCU conversion program ° 
Additional Peripherals 

Semop** 64K memory expanse 

$X59 95 

Programs: 



*/V>5 Wii Bang 
$9 95 Stocks $ 9 95 M-h 

$ 7 95 Bio Rhythms ? 

Why buy from CAl. 

All c\l Pe"P^ l m C a r a e ls W sc h hemat,cs 

warranty _Each worn MicroAce and 
Sinclair ZX-80, £*?'• 
Timex/ Sinclair 1000. 



$1 A95 Home 
XT' Finance 



$ 



119 s 



k 95 



Pefipher nil/ Board for complete 
requires CAII u d"* r .[ 
compatibility *>th° thelCA1 
peripherals 



<fcf\95 Math 
^ Tutorial 



I 
I 




CAl Instruments, Inc. 

Evening Hours (Technics Fm mail orders, send 

Orders accepted by P^sH MASTERCARD 'numbers. 

:heck. money °^' V ^ made to U.S. currency. 
Foreign orders must be m , T . 



X •»--' peripherals ^ 

Mass Storage DevK t 

speed of a disc drive at an ive 

p P ri ce. Data to "°^ °^ an / cassette, 
continuous loop ™P^rap gt an 

ThlS f:; C u n Kud 5 P 6 times faster 

versatility- 
$109 95 C-CM/0 Board 





rsySfafATL- 

TOTAL 

' D U,e "T^n HANDLING CHARGES 

SHIPPING AND HANUUiN F Q B 

'Within U.S. $5.00 Out.AU 

Midland, Ml 

MasterCard/ Visa 

Exp. Date 

Name 

Addre5S - I^T- 

City 

Phone No. 



\ 



CAl/P40Pnn ter 







VCAl/O 


^ 


• 


\cA>/0^ 


Board 






1 


jh 


- 


" 




■DOSBBflDV 


"mm*** 


B 


_- * 









1. Iissajous Patterns. (See Figure 6.) 

a. General form: 
X = A»SIN(N*T+D) 
Y=B*SIN T 

b. This example: 
A=B=1;D=0;N=.75 

c. Program data: ENTER: 
CART.PARA. 2 
XMIN,XMAX,YMIN,YMAX -1,1,-1,1 
PARAMETER RANGE -20,20 

X EXPRESSION SIN(.75*T) 

Y EXPRESSION SIN T 



7. Eight Curve. 

a. General forms: 
THETA=ATN SIN T 
R=A»COS T*SQR (1 + SIN T**2) 

b. This example: 
A=2 

c. Program data: 
POLAR PARA. 
XMIN,XMAX,YMIN,YMAX 
PARAMETER RANGE 
THETA EXPRESSION 
R EXPRESSION 



ENTER: 

4 

-2,2,-2,2 

-PI.PI 

ATN SIN T 

2*COS T*SQR (1+SIN T*SIN T) 



ENTER: 

2 

-1,1,-1,1 

-PI, PI 

COS T'COS T*COS T 

SIN T*SIN T*SIN T 



ENTER: 
3 

-.5,3,-2,2 
-PI, PI 
2*COST+l 



2. Astroid. (See Figure 7.) 

a. General form: 
X=4*A*(COS T)«3 
Y=4*A*(SIN T)»*3 

b. This example: 
A=.25 

c. Program data: 
CART.PARA. 

XMIN,XMAX,YM1N,YMAX 
PARAMETER RANGE 

X EXPRESSION 

Y EXPRESSION 

3. Limacon of Pascal. 

a. General form: 
R=2*ACOST+B 

b. This example: 
A=B=1 

c. Program data: 
POLAR 

XMIN,XMAX,YMIN,YMAX 
THETA RANGE 

R EXPRESSION 

4. Rhodonea. (Figure 8.) 

a. General form: 
R=A*COS (N»T) 

b. This example: 
A = 1;N=7 

c. Program data: 
POLAR 

XMIN,XMAX,YMIN,YMAX 
THETA RANGE 

R EXPRESSION 

5. Serpentine. (Figure 9. 

a. General form: 
Y=X»B**2/(X**2+A*»2) 

b. This example: 
A=2;B=6 

c. Program data: 
CART. 

XMIN,XMAX,YMIN,YMAX 
PARAMETER RANGE 

Y EXPRESSION 



6. Catenary. 

a. General form: 
Y=A/2*(EXP(X/A)+EXP(-X/A)) 

b. This example: 

A=2 

c. Program data: ENTER: 
CART. 1 
XMIN,XMAX,YMIN,YMAX -5,5,0,20 

Y EXPRESSION EXP (X/2)+EXP (-X/2) 



ENTER: 
3 

-1,1,-1,1 
-PI.PI 

COS (7*T) 



Method 



8. Folium of Descartes. 

a. General forms: 
THETA ATN T 
R=3*A*T*SQR (1+T**2)/(1+T**3) 

b. This example: 
A=5 

c. Program data: 
POLAR PARA. 
XMIN,XMAX,YMIN,YMAX 
PARAMETER RANGE 
THETA EXPRESSION 
R EXPRESSION 

9. Additional Examples: 

a. Polynomial (CART. ): 
Y=A0+A1*X+A2*X"2+A3* 
X"3++AN'X**N 

b. Hypotrochoid (CART.PARA.) 
X=N*COS T+H*COS (N*T/B) 
Y=N*SIN T-H*SIN (N*T/B) 

c. Epitrochoid (CART.PARA.): 
X=N*COS T-H*COS (N»T/B) 
Y=N*COS T-H*COS (N*T/B) 

d. Archimedes' Spiral (POLAR): 
R=A»T 

e. Spirals (POLAR PARA.): 
THETA=T"M 

R=A*T 

Figure 3. 



ENTER: 

4 

-10,10,-10,10 

-5,5 

ATNT 

15*T*SQR (1+T*T)/(1+T*T*T) 



Independent Coordinates 
Variable 



Example 





CARTESIAN 


X 


(X,Y) = (X,f(X)) 


Y=X"2 (PARABOLA) 


ENTER: 

1 

-10,10,-10,10 


CARTESIAN 
PARAMETRIC 


T 


(X,Y) = (f,(T),f 2 (T)) 


X=T (PARABOLA) 
Y=T"2 




POLAR 


THETA, or 9 


(Rfi) = (f(6),e) 


R=2'THETA (SPIRAL) 


(X*36)/(X*X+4) 


POLAR 
PARAMETIC 


T 


(R^-=(f,(T),f (T)) 
1 ^ 


THETA = T (SPIRAL) 
R = 2*T 



32 



SYNC Magazine 



" Touch- A- Mat ic " Power 
At Your Finger Tips! 




$9.95 



KOPAK'S TOUCH-A-MATIC™ gives you the power to type more accurately 
and much faster. It requires no wires, no soldering. Comes with complete 
instructions. It's as easy as removing adhesive backing and pressing into 
position. Positioning is easy. Once in position, you are ready for touch- 
typing with ease. 

Our unique vinyl-key-hold creation will guide your fingers to the correct 
keys. Finally, touch-typing now possible with your Sinclair* or Micro-Ace*. 

This remarkable product, as well as other KOPAK items, are now available. 
Call now to order through MC/Visa or send check/M.O. to Kopak Creations, 
Inc. 



TM Trademark of KOPAK Creations, Inc. 
Sinclair* is a trademark of Sinclair* Research LTD. 
MicroAce* is a trademark of MicroAce* 



KOPAK CREATIONS, INC. 

(212) 757-8698 

Master Charge & Visa Accepted 



$1.50 Handling Charge 



Dept. SY2 448 West 55th Street, New York, NY 10019 (212) 757 8698 



-Figure 5. 



. Figure 6. Lissajous Pattern. 
Y 



XMAX.YMAX 
-X 




X- - 

XMIN.YMIN 

a) Pinning window. 





hi Resulting plot. 



X = COST 
Y = SINT 



Memory Expansion at 
Unexpanded Prices 




16K Memory Expansion 

Simply plugs into your 

Timex/Sinclair 1000 

Fully tested top quality products 

Price only $35.00 

64K Memory Expansion 

Plugs into your Timex/Sinclair 1000 

Fully tested top quality products 

56K of directly addressable memory 

2 x 4K pages can be switched in or 

out for use with mapped memory 

peripherals Price only $110.00 , > 



I ntern ational money order or certified cheque inclusive of Postage and Packaging payable to Namal Associates 

Namal Associates 25 Gwydir Street. Cambridge. CB1 2LG ENGLAND Telephone: (0223) 355404 Telex: 817445 



I 
I 
I 
I 

L 

34 



Please rush me (Quantity) 16K Memory Expansions $35.00 

Please rush me (Quantity) 64K Memory Expansions $110.00 

Add Postage and Packaging $4.50 I enclose $ 



Name. 



.Signature- 



Address. 



I 

I 

I 

I 

J 
SYNC Magazine 



S N D ME 



- Figure 8. Rhodonea. 




Y _ 262L 

Y ~ X ! +4 





ADVENTURE 

VOYAGER l-Voyage thru time and space in this new 
fantasy game. In Voyager 1 you will travel to Sangrel to 
find the rare element Valium for new Energy Weapons. 
Voyager 1 includes: 

One key entry of commands 
Over 16 Billion Characters 
2 Sides of Adventure 1 6k each 
Graphic display of status 
Over 20 Encounters to deal with 
Quality C-20 Cassette 






J Add Sound to V 
Your ZX81 ! 

Sounder circuit fits 
inside the ZX81/Timex 1000 
No cutting, 
soldering, 
or unsoldering. 
Circuit beeps when 




Instructions Only $9.95 

You may use one of your own Characters from your 
favorite Role Playing Game if you wish or you may use 
one of over 16 billion Characters. 

VOYAGER II COMING SOON 

Saveable in progress 

Explorer I- You find a strange new world when you walk 
into a strange mist on your way home. This is a text 
adventure and is saveable in progress. $9.95 

Explorer ll-After a week back home once again you find 
yourself transported to a strange new world. Text ad- 
venture - Saveable in progress $9.95 
Send for catalog with 1k to 16k programs. Postage is 
included in price. All programs come on a Quality C-20 
Computer grade Cassette with instructions. 
Send to: Chris White 

789 S. Green Bay Road 
Lake Forest, IL. 60045 




Key inpuis are 

accepted by the computer. 

Send $12.00 per unit 

plus $2.00 postage 

and handling 

(N.J. Residents add 5% Sales Tax) 

to 

KML Incorporated 

P.O. Box 1147 

^New Brunswick, N.J. 08903 /■ 



November/December 1982 



35 



The Zedex Microfair 

Jim Beloff 



Quick! What are three ways you can 
tell you're at a ZX Microfair in En- 
gland? Give Up? Well, for one, you will 
be seeing a lot of Sinclair Spectrums as 
well as ZX81s; two, you find yourself 
saying "ZEDEX" instead of "ZEE- EX"; 
and three, there is kidney pie and ale to 
be found in the exhibition hall cafeteria. 

Had you been in London's Westmin- 
ster Exhibition Centre on August 21, 
1982, you might have seen, said, and 
tasted as I did. Sydney Rogers (Director 
of Marketing for Ah 1 Computing), Ha- 
zel Gordon (Creative Computing's U.K. 
representative), and I were at the 
Microfair representing SYNC, and hap- 
pily succumbed to it all. 

Touted as the "largest single display 
of ZX products under one roof any- 
where," this 4th ZX Microfair more 
than lived up to its reputation. Orga- 
nized by a rather jolly, beared Mike 
Johnston, the fair offered 80 tables 
worth of hardware, software, 
peripherals, books, etc. for the ZX81 
and Sinclair Spectrum. Enough, in fact, 
to make one wish the fair were two days 
long instead of one. 

If there were a lot of exhibitors at the 
fair, there were at least twenty times that 
many Sinclair owners. By 10 a.m. the 
line to get inside was two city blocks 
long, and by 1 1 a.m. getting through the 
aisles was like a game of MAZOGS (see 
below). 

None of this, however, could stop me 
from feeling absolutely amazed at the 
sheer number of products available for 
this little $99 microcomputer, and how 
many of those seemed to be creative 
technical achievements comparable to 
the Sinclair computers themselves. 
Wherever someone has found a limita- 
tion in the ZX81, someone else has been 
bound and determined to find an 
antidote. 

For example, loading a 16K program 
takes a few minutes. Right? Wrong! A 



company called Personal Software Ser- 
vices in Coventry has invented QSAVE, 
which allows you to LOAD or SAVE 
16K in 29 seconds. Making sounds and 
music with your ZX81 is almost impos- 
sible. Right? Wrong again! David Ward 
at BI-PAK has the ZON X-81 sound 
unit which can make a multitude of 
sound effects and gives eight full octaves 
of tones. A company called Macronics 
has an interface for a disk drive, Kayde, 
Fuller Micro, and DKTronics have full 
keyboards that the ZX81 fits inside, the 
Kempston Electronics has KLIK-KEY- 
BOARD that fits on the top of the mem- 
brane. JRS Software has a tripped down 
16K rampack for $39.95, and Sir Com- 
puters has an interface card that lets 
your ZX81 run a robotic arm. You can 
turn your ZX81 into a business comput- 
er with the Cobra 1000 business system, 
and Dean Electronics has a brand new 
ZX81 compatible printer. Memotech 
continues to add to its growing line of 



SHOW 001DC AND PLAN. FULL UST Of EXHIBITORS, 
2X11 AND SPECTRUM IN ACTION 
BRING AND BUVSALt 
NATIONAL AND LOCAL CLUBS. 
FREE PROGRAM LISTING OVER 80 ZX SUPPLIERS 

EVERYTHING FOR THE ZX USER AN0 SNTHUSIASI 




WD0M OtWTM WffCOtf SI LDMOIf V 



powerful MEMOPAKS and also dis- 
plays its own RS-232 Interface. 

If there were a lot of new hardware 
add-ons to be found at the Microfair, 
there were just as many new software 
packages. Mr. Wolfkamp from the 
Netherlands had a book/tape package 
full of high level programming tech- 
niques, including a graphics routine of a 
bicyclist that was marvelous. BUG- 
BYTE from Liverpool had a game called 
MAZOGS that drew not only a crowd, 
but a very challenging maze as well. 
Fair-goers also had a "blast" watching 
Panda Software's new game SEA 
WARS. 

Add to all of these products for the 
ZX8 1 another raft of goodies for the Sin- 
clair Spectrum. QuickSilva had some 
outstanding full color games for the 
Spectrum, SYNCs own Martin Wren- 
Hilton had a book entitled Games to 
Play on Your ZX Spectrum published by 
Shiva. Almost every other exhibitor with 
ZX81 products had something available 
or "in the works" for the Spectrum. The 
combination of color, sound, and low 
price have made the Spectrum the hot- 
test microcomputer in England, and cer- 
tainly we will be looking forward to its 
coming to the U.S. 

Perhaps the nicest part of the fair was 
getting to know some of the exhibitors 
and fair-goers themselves. In general, 
enthusiasts are a fun bunch, if only for 
the fact that they are, well, enthusiastic, 
but Sinclair enthusiasts are special. 
Somehow the feeling of "they say it can't 
be done so let's do it" type of ingenuity 
runs rampant throughout this group. 
Also, there seemed to be a lot of parents 
and children in attendance, and both 
groups seemed equally captivated by the 
goings-on. 

The fair finally wound down about 6 
p.m., and the exhibitors started packing 
up the televisions, the Sinclairs, the 
rampacks, hardware, software, books, 
etc. until the next ZX Microfair. 

Then it dawned on me: there are 
something like 300,000 Sinclair Comput- 
er owners in the United States, more 
than in any other country. And there are 
close to as many manufacturers of Sin- 
clair related products in the U.S. as 
there are in England. Why doesn't some- 
body organize a Sinclair Microfair for 
the United States owners? How about a 
show on the East coast, the Midwest, 
and the West Coast? Anyone out there 
up to the challenge? Well, it's a thought, 
and judging from the good time I had in 
London, a fun thought at that! H 



36 



SYNC Magazine 



Sinclair Hi-Res Graphics 

+ 48K RAM + 
8K EPROM Programmer 




ZX-G Expansion Unit 




o txtended Use 



Introducing Hi-Resolution Graphics 
for the Sinclair ZX-81 

Now you can create detailed graphics images with the new. 
high quality, low cost ZX-G Expansion Unit. 

Quality Graphics 

The ZX-G gives your ZX-81 the ability to create memory- 
mapped graphics images with a resolution of 256 X 192 pixels. 

— Graphics images can be drawn, moved, rotated, mixed 
with text, saved on cassette or printed. 

— Excellent for Computer Aided Design, education and 
games. 

Powerful Software! (cassette included) 

— Generate lines, circles, and rectangles with ease! 

— A dynamic graphics cursor facilitates rapid design. 

— Graphics animation is fully supported! 

Memory Expansion! 

— With the ZX-G, you can expand the memory of your 
computer to 48K' 

— Up to four hi-res. graphics screens can be stored in 
addition to a 16K program! 



EPROM Programmer Support! 

— With our optional EPROM programmer, (fully 
transparent), 2716 (8K) EPROMs can be programmed, 
verified and run directly in memory map (2000-3FFFH) 

Compact Design! 

— The total unit (including power supply) is enclosed in an 
attractive vinyl-clad aluminum case. 

— Cable and power cord included! 

— 90 Day Warranty (parts & labor) 

ZX-G Expansion Unit $99.95 

RAM/EPROM Option $79.95 

(includes 32K RAM + four 2716 EPROMs. ZX-G required) 

Free Graphics Software 



Mail Order to: 

Southern Computer Systems 

630 Main Street 
Shelbyville. Kentucky 40065 
or call collect: (502^ 633-5640 




AARDVARK - THE ADVENTURE PLACE 

ADVENTURES FOR OSI, TRS-80, TRS-80 COLOR, SINCLAIR, PET, VIC-20 



ADVENTURES — Adventures are a unique 
form of computer game. They let you spend 
30 to 70 hours exploring and conquering a 
world you have never seen before. There is 
little or no luck in Adventuring. The rewards 
are for creative thinking, courage, and wise 
gambling — not fast reflexes. 

In Adventuring, the computer speaks and 
listens to plain English. No prior knowledge 
of computers, special controls, or games is re- 
quired so everyone enjoys them — even people 
who do not like computers. 

Except for Quest, itself unique among Ad- 
venture games. Adventures are non-graphic. 
Adventures are more like a novel than a comic 
book or arcade game. It is like reading a par- 
ticular exciting book where you are the main 
character. 

All of the Adventures in this ad are in Basic. 
They are full featured, fully plotted adventures 
that will take a minimum of thirty hours (in 
several sittings) to play. 

Adventuring requires 16k on Sinclair, TRS- 
80, and TRS-80 Color. They require 8k on OSI 
and 13k on VIC-20. Sinclair requires extended 
BASIC. 

TREK ADVENTURE by Bob Retelle - This 
one takes place aboard a familiar starship and 
is a must for trekkies. The problem is a famil- 
iar one — The ship is in a "decaying orbit" 
(the Captain never could learn to park I) and 
the engines are out (You would think that in 
all those years, they would have learned to 
build some that didn't die once a week). Your 
options are to start the engine, save the ship, 
get off the ship, or die. Good Luck. 

Authors note to players — I wrote this one 
with a concordance in hand. It is very accurate 
— and a lot of fun. It was nice to wander 
around the ship instead of watching it on T.V. 

CIRCLE WORLD by Bob Anderson - The 

Alien culture has built a huge world in the 
shape of a ring circling their sun. They left 
behind some strange creatures and a lot of ad- 
vanced technology. Unfortunately, the world 
is headed for destruction and it is your job to 
save it before it plunges into the sun I 

Editors note to players — In keeping with 
the large scale of Circle World, the author 
wrote a very large adventure. It has a lot of 
rooms and a lot of objects in them. It is a very 
convoluted, very complex adventure. One of 
our largest. Not available on OSI. 

HAUNTED HOUSE by Bob Anderson - This 
one is for the kids. The house has ghosts, gob- 
lins, vampires and treasures — and problems 
designed for the 8 to 13 year old. This is a 
real adventure and does require some thinking 
and problem solving — but only for kids. 

Authors note to players — This one was fun 
to write. The vocabulary and characters were 
designed for younger players and lots of things 
happen when they give the computer com- 
mands. This one teaches logical thought, map- 
ping skills, and creativity while keeping their 
interest. 



DERELICT by Rodger Olsen and Bob Ander 
son — For Wealth and Glory, you have to ran- 
sack a thousand year old space ship. You'll 
have to learn to speak their language and 
operate the machinery they left behind. The 
hardest problem of all is to live through it. 

Authors note to players - This adventure 
is the new winner in the "Toughest Adventure 
at Aardvark Sweepstakes". Our most difficult 
problem in writing the adventure was to keep 
it logical and realistic. There are no irrational 
traps and sudden senseless deaths in Derelict. 
This ship was designed to be perfectly safe for 
its' builders. It just happens to be deadly to 
alien invaders like you. 




PYRAMID by Rodger Olsen - This is one of 
our toughest Adventures. Average time 
through the Pyramid is 50 to 70 hours. The 
old boys who built this Pyramid did not mean 
for it to be ransacked by people like you. 

Authors note to players — This is a very 
entertaining and very tough adventure. I left 
clues everywhere but came up with some in- 
genous problems. This one has captivated 
people so much that I get calls daily from as 
far away as New Zealand and France from 
bleary eyed people who are stuck in the 
Pyramid and desperate for more clues. 

QUEST by Bob Retelle and Rodger Olsen - 

THIS IS DIFFERENT FROM ALL THE 
OTHER GAMES OF ADVENTURE IN! It is 
played on a computer generated map of 
Alesia. You lead a small band of adventurers 
on a mission to conquer the Citadel of Moor- 
lock. You have to build an army and then arm 
and feed them by combat, bargaining, explora- 
tion of ruins and temples, and outright ban- 
ditry. The game takes 2 to 5 hours to play 
and is different each time. The TRS-80 Color 
version has nice visual effects and sound. Not 
available on OSI. This is the most popular 
game we have ever published. 

MARS by Rodger Olsen — Your ship crashed 
on the Red Planet and you have to get home. 
You will have to explore a Martian city, repair 
your ship and deal with possibly hostile aliens 
to get home again. 

Authors note to players — This is highly 
recommended as a first adventure. It is in no 
way simple — playing time normally runs from 
30 to 50 hours — but it is constructed in a 
more "open" manner to let you try out ad- 
venturing and get used to the game before 
you hit the really tough problems. 



NUCLEAR SUB by Bob Retelle - You start 
at the bottom of the ocean in a wrecked Nu- 
clear Sub. There is literally no way to go but 
up. Save the ship, raise her, or get out of her 
before she blows or start WWIII. 

Editors note to players — This was actually 
plotted by Rodger Olsen, Bob Retelle, and 
someone you don't know — Three of the nas- 
tiest minds in adventure writing. It is devious, 
wicked, and kills you often. The TRS-80 Color 
version has nice sound and special effects. 

EARTHQUAKE by Bob Anderson and Rodger 
Olsen — A second kids adventure. You are 
trapped in a shopping center during an earth- 
quake. There is a way out, but you need help. 
To save yourself, you have to be a hero and 
save others first. 

Authors note to players — This one feels 
good. Not only is it designed for the younger 
set (see note on Haunted House), but It also 
plays nicely. Instead of killing, you have to 
save lives to win this one. The player must 
help others first if he/she is to survive — I like 
that. 

Please specify system on all orders 




ADVENTURE WRITING/DEATHSHIP by 
Rodger Olsen — This is a data sheet showing 
how we do it. It is about 14 pages of detailed 
instructions how to write your own adven- 
tures. It contains the entire text of Deathship. 
Data sheet - $3.95. NOTE: Owners of OSI, 
TRS-80, TRS-80 Color, and Vic 20 computers 
can also get Deathship on tape for an addi- 
tional $5.00. 

PRICE AND AVAILABILITY: 

All adventures are $14.95 on tape except 
Earthquake and Haunted House which are 
$9.95. Disk versions are available on OSI and 
TRS-80 Color for $2.00 additional. 



ALSO FROM AARDVARK - This is only a partial list of what we carry. We have a lot of other games (particularly for the 
TRS-80 Color and OSI), business programs, blank tapes and disks and hardware. Send $1.00 for our complete catalog. 



VM 



AARDVARK - 80 

2352 S. Commerce, Walled Lake, Ml 48088 

(313)669-3110 

Phone Orders Accepted 8:00 a.m. to 4:00 p.m. EST. Mon.-Fri. 



^ 



TRS-80 COLOR 



SINCLAIR 



OSI 



VIC-20 




Meditations on a 
Hypotrochoid 

Bradley Rogers 



The plotting capacity of the ZX80(81) 
enables even the least artistically talent- 
ed to create some pretty dazzling dis- 
plays. The much denigrated sine and co- 
sine functions conceal mathematical 
mysteries that are invisible to mere num- 
ber crunchers. 

Take the hypotrochoid. It is repre- 
sented by a rather formidable mathemat- 
ical expression, but it makes a marvel- 
lous propellor if displayed on your 
Sinclair. 

x = n cos t 4- h cos n/b t 

y = n sin t - h sin n/b t 

In mathematical parlance, this is a 
parametric formula describing the 
hypotrochoid. X and Y are the coordi- 
nates of the graph which can be pro- 
duced by means of the PLOT command, 
"t" is a variable representing the infinite 
number of angles a radius creates as it 
sweeps round a circle, "t" plays a part 
because a hypotrochoid is a line formed 



Bradley Rogers, lfi Hepbourne St.. Toronto. 
Ontario. Canada M6H IJ9. 



by a point fixed to a circle rolling along 
the inner side of a stationary circle, "n," 
"h," and "b" are parameters that are 
uniquely defined for each size and shape 
of hypotrochoid. 

Although this description may seem a 
bit overwhelming to those allergic to 
mathematics, it translates into very sim- 
ple programs. Try this: 

10 LET ] 

SB LET T=T+.l 

30 LET X=12*COS TtSiCOS (**T.i 

40 LET V=12*SIN T-SJSIN <*»TJ 

50 PLOT X+30,Y+28 

60 GOTO 20 

This routine can be run in either 
SLOW or FAST mode. Whenever you 
want to stop the program and admire 
your handiwork, simply press the 
BREAK pedal. Beware, it takes a while 
for this program to cook, especially in 
the SLOW mode. Through successive it- 
erations the lines are gradually filled in 
to form a continuous propellor. 

The hypotrochoid expresses the ele- 
gant simplicity and exquisite symmetry 
trapped inside many algebraic expres- 
sions. Its formula also contains an infi- 



Nk ROM 
IK RAM 



nite number of bizarre, fascinating, and 
sometimes whimsical figures that can be 
coaxed out by mathematical mutilation. 
For example, try altering lines 30, 40, 
and 50 in this fashion. 

10 LET T=0 

20 LET T=T + . 1 

30 LET X=iatCOS TttlCOS (4»T) 

4.0 LET Y = 12*SIN T-8*SIN < 4 *T > 

50 plot vtse.x+ae 

60 GOTO 20 

Surprise. The propellor has metamor- 
phosed into a doll. A more intricate doll, 
a dancer I think, can be formed by the 
following alteration: 

10 LET T=0 

SB LET T=T + .l _ ^„_ ,.._» 

30 LET X=12*COS T+8*C05 <**J! 

«.e> let y = ia»siM T-6+SIN l9*Tf 

50 PLOT Y +38 . X +28 

60 GOTO 20 

Note that in the last two examples I 
have reversed the X and Y plot position 
in order to rotate the display 90 degrees. 
I suppose that mathematically speaking, 
these figures are no longer hypotro- 
choids, but they are the result of medita- 
tions on a hypotrochoid. For something 
completely different, try this: 

10 LET T=0 

20 LET T =T + . 1 

30 LET X=6*COS T + B*COS <4.»T+.S 
) 

4.0 LET Y = 12*SIN T-41S1N <4.*T) 

S0 PLOT Y+30,X+20 

60 GOTO 20 

I call it the "angry cat." If you are 
fond of butterflies, try this galactic 
variety: 

10 LET T=0 

S0 LET T=T+.l _ 

30 LET X=6*COS T+8*COS (6*T< 

4.0 LET YslSaSXN T-tiSIN «6»T.« 

50 PLOT V +30 , X +20 

60 GOTO 20 

It is quite remarkable how resiliant 
this framework is. By means of seeming- 
ly random alterations, interesting forms 
emerge. Garbage is possible, but rela- 
tively rare. Try your hand and see what 
you come up with. It is a simple process 
of artistic experimentation. Be careful, 
however, not to choose large values for n 
and h that run the figure off the screen. 

If you find this interesting, I highly 
recommend a book by J. Dennis Law- 
rence called A Catalog of Special Plane 
Curves. It is published as a durable pa- 
perback by Dover (New York, 1972). In 
it I discovered the hypotrochoid and its 
parametric representation. If you get ex- 
cited by deltoids, hippopedes, rhodonea 
and nephroids, buy it. You can meditate 
and discover the inner harmonies of 
your computer. And, by the way, by 
drawing amusing and sometimes beauti- 
ful computer pictures, you may be able 
to convince your sceptical spouse or not 
easily impressed children that computers 
are not all that bad. 

As a parting gesture, I give you 
"Acquatic Pegasus." 

10 LET T=0 

20 LET T=T+. 1 

3© LET X«12*COS T+B+COS C3+T+2 
) 

40 LET Y=12*SIM T-8tSIH «8*T»_, 

50 PLOT Y+30. X+20 V 

60 GOTO 20 L - m 



November /December 1982 



39 






New Advanced Technolo gy 




Easy to Use) 



( Compact^) 



• Fits Sinclair ZX80, ZX81 and Timex - Sinclair 1000. 

• First time offered - order early to avoid delays 

• For orders Call Toll Free 
1-800-344-8211 

— Visa 

— Mastercard 



CompuTech& Software Industries, in< 



A Machine Code Graphics Line 
Drawing Subroutine 

Daniel Kopyc 



8k ROM 
16KRAM 



In the pages of the ZX81 manual, we 
find a Basic subroutine to draw a line 
between any two specified points (see 
Listing 1). However, I found this routine 
to be exceedingly slow, especially when I 
wanted to draw several lines on the screen 
and had to wait several agonizing minutes 
to get them. The only solution was to 
translate the Basic subroutine into Z80 
machine language. 

This was a fairly straightforward task 
as the Basic routine did not employ any 
complex mathematical functions or oper- 
ations beyond ABS, SGN, subtraction and 
addition. I was able to find the address of 
the PLOT/UNPLOT routine in the 8K 
Basic ROM through the use of Bob 
Maunder's book, The ZX81 Companion. 
To plot a point on the screen, the C and 
B registers of the processor are loaded 
with the X and Y coordinates of the point 
to be plotted, respectively, and a call is 
made to the PLOT/UNPLOT routine at 
address BB2h. Location 4030h (16432d), 
T-ADDR in the system variables listed on 
p. 173 of the ZX81 manual, controls the 
color (black or white) of the plotted point, 
thus making the routine at BB2h selec- 
tively either PLOT or UNPLOT. A value 
of in T-ADDR UNPLOTS, 4Bh PLOTS. 
This is demonstrated in the section of 
Line Draw at address 41A0h. I also 
wanted to make the Line Draw routine 
very user friendly and completely usable 
by the person who has either no know- 
ledge of machine language at all or a 
severe phobia of PEEKs and POKEs. So, 
I added a short section of code to read 
out the values of five control variables 
from the variable storage section of the 
Basic interpreter (see Listing 3, at 
addresses 4082h through 40A5h). 

Daniel Kopyc, Box 106, Trumansburg, NY 14886. 

Listing 1 is from ZX8I BASIC Programming 
( 1st ed., 1980). p. 121, and is provided for use as a 
subroutine in User written programs only. 



To enter the Line Draw program, first 
type in the short Basic monitor program 
in Listing 2 (including the big REM state- 
ment) that we will use to enter, edit, and 
review the machine code for Line Draw. 
After entering the program just as it is 
shown, type LIST 10 so that the REM 
statement is scrolled off the screen and 
will not crash the system. The monitor 
that I am using here is developed out of 
my experience in working with the Apple 
II computer. I had found a monitor pro- 
gram that was easy to use and all around 
nifty. As a result I decided that the ZX81 
should have that type of program, so I 
wrote a version for the ZX81 in Basic. 

Enter the monitor program in Listing 2 



Listing 1 . Line-Draw Program in Basic 

1000 LET U=C-fl 

1005 REM Ll SHOWS HOW MBNY STEPS 

BUONG LIE NEED TO GO 

131B LET U=D-B 

1015 REM U SHOUS HOU MANY STEPS 

JP 

1020 LET D1X=SGN U 



1030 LET D1Y=SGN 
1035 REM 



IS fi SINGLE 



IS R SINGLE 



(D1X.D1Y) 
5TEP IN R DIRGONR.L DIRECTION 
1040 LET D2X=SGN U 
1050 LET D2Y=© 
1055 REM (D2X,D2Y) 
STEP LEFT OR RIGHT 
1060 LET M=flBS U 
1070 LET N=RBS <J 
12130 IF M)N THEN GOTO 1130 
1090 LET t>ax=8 
110© LET D2Y=SGN U 

1105 REM NOU (D2X,D2Y) IS R SING 
. E STEP UP OR DOUN 
: 110 LET M=RBS U 
I 12© LET N=RBS U 

.130 REM M IS THE LRRGER OF BBS 
U RND BBS V , N IS THE SMOLLER 
114.0 LET S = INT IH/2) 
) 145 REM L\E UBHT TO HOUE FROH (* 

B) TO (C,D) IN M STEPS USING N 
JP-DOUN OR RIGHT -LEFT STEPS D2, 
^ND M-N DIRGUNRL STEPS Dl , DI3TP 
IBLTTED RS EVENLY B5 POSSIBLE 
3 150 FOR 1=0 TO H 
1160 PLOT R,B 
1170 LET S=S+N 

1160 IF S<M THEN GOTO 1230 
119© LET S=S-M 
I2BO LET R=R+D1X 
121© LET B=B+D1Y 
L31S REM R DIBGONOL STEP 
.220 GOTO 1250 
12 30 LET fl=fl»D2X 
i240 LET B=B+DSY 

1245 REM RN UP-DOUN OR RIGHT -LEF 
T STEP 
1250 NEXT I 
1260 RETURN 



and then type RUN. Every line after the 
prompt symbol (=) starts with a 4-digit 
hexadecimal address. The next character 
(the command character) may be either a 
G, meaning GOTO, or start executing 
the machine language program at the 
preceding address; an L, meaning LIST 
the contents of eight consective memory 
locations starting at the preceding 
address; or a :, which deposits the fol- 
lowing eight, 2-digit, hexadecimal values, 
separated by one space, into consecutive 
memory locations starting with the spec- 
ified address. Some examples are given in 
Listing 4. This monitor program will be 
helpful in entering and debugging 
machine language programs other than 
just Line Draw, so you might want to save 
a version on tape. 



Listing 2. A ZX Monitor Program. 



1 REM 1234.56 73911HDC 
89BBBCOEF1231S6769eflBC 
8 90RBCDEF123456 7S90fleC 
890RBCDEF1234567S90RBC 
6 90RBCDEF 123456 7390BBC 
S90RBCDEF123456 7390RBC 
39OflBCDEF1234S6 7e90RBC 
g9BBBCOEF123*567S9diBBC 
39BRBCDEF1234-56739eflBC 
390RBCDEF12345S7e90BlBC 
390RBCDEF 

10 IF PEEK 16442=4 T 
20 LET C =0 
30 PRINT 
40 PRINT ">>*'; 
SO INPUT fi* 
SO PRINT «*, 
70 FOR R=l TO 4 
8© LET C-C+16** 14-RJ 
R TO R) -26) 
90 NEXT R 
1O0 LET 0*=fi»l5 TO S) 
110 GOTO <Q* = " : " ) *20O 
3O0 + tO* = "G p ) #400 
20© FOR D=6 TO LEN R* 
210 POKE INT tC+l'l'D-6 
(CODE R* (C- TO D) -23) ) + 
1 TO D + I.< -28 
220 NEXT D 
230 GOTO 1© 
3O0 PRINT " f, C; •! " 
31© PRINT " "; 
32© PRINT R*<1 TO 4>, 
33© FOR F=C TO C+7 
340 LET RiPEEh F 
35© LET M=INT IR/161 
36© PRINT CHR* (M+2S) 
»16+28) ; " •■; 
37© NEXT F 
33© GOTO 10 
40© PRINT " (BC = ",LI5R 
41© GOTO 10 



DEF12345S 

DEF123456" 

DEF123451? 

DEF12345^ 

DEF1234SS 

DEF12345* 

DEF1234Se 

DEF1834SS 

DEF12;-i^ 5 

DEF1234S? 

HEN CLS 



* l CODE r,5 



+ IOS="L" • 
STEP 3 

) .-3.1 i , tia 

CODE ft* ■ 



CHR* <R- 



November /December 1982 



41 



SINWARE provides these high-quality 
machine-code programs for the TS1000 
or ZX81. 

HOTZ 

HOT Z is a machine-programming editor 
with a debugger and disassembler that 
help take the mystery out of assembly 
language. A cursor-driven command 
system provides an interactive program- 
ming environment for entering, revising 
and relocating code. Full-screen listings 
with user labels let you understand other 
programs and capture the power of 
ROM routines for your own programs. 
An indispensable tool for learning how 
the black box works. 

HOT Z loads, saves and runs your ZX 
printer or Memotech port for program 
documentation. HOT Z's detailed 
instructions are ideal for the beginner or 
part-timer. 

HOT Z is available on cassette in 
different versions for 16K or 32K + . 
Please specify. 

Z EXTRA 

Z EXTRA is a display creator/ 
controller that makes you a master of ZX 
graphics and displays. No programming 
is required to create, save, print or 
display multiple screens of text and 
graphics. 

Z EXTRA features blinking cursors, 
repeating keys, four write directions, 
eight plot directions, 4x4 and 8x8 
character sizes, and full-screen editing 
capability. 

Z EXTRA'S displays provide horizontal 
or vertical scrolls of multiple screens 
against a background screen, or timed 
page flips for simple animation. Screens 
can be transferred to BASIC strings to 
save hours of fussy programming. 

Z EXTRA turns your ZX81 into an 
electronic notebook for free-form lists, 
formatted data files, data displays, 
moving bilboards, or just for fun. 

Z EXTRA requires a ZX81 or TS1000 
with at least 16K or RAM and is 
especially useful with 64K. Just $19.95 
on cassette. 

SINWARE 

BOX 323, DIXON, NM 87527 



4082H: DD 21 3C 40 


LD IX, VA 


;L0AD VARIABLES FROM 


2A 10 40 


LD HL, (VARS) 


;AREA IN MEMORY AND 


06 05 


LD B,05 


;STORE IN SINGLE-BYTE 


408BH: 23 


INC HL 


{RESERVED LOCATIONS 


7E 


LD A,(HL) 


;SEE VARIABLE MAP AT 


D6 80 


SUB 80H 


;END OF THIS LISTING 


23 


INC HL 




16 00 


LD D.00 




4092H: 5E 


LD E, (HL) 




CB FB 


SET 7,E 




4095H: CB 23 


SLA E 




CB 12 


RL D 




3D 


DEC A 




20 F9 


JR NZ.4095H 




DD 72 00 


LD (LX+0),D 




DD 23 


inc rx 




40A1H: 23 


INC HL 




23 


INC HL 




23 


DJC HL 




23 


INC HL 




23 


INC HL 




10 E4 


DJNZ.408BH 




3A 3C 40 


LD A, (VA) 


;LET U=C-A 


47 


LD B,A 




3A 3E 40 


LD A, (VC) 




40AEH: 90 


SUB B 




32 50 40 


LD (VU),A 




3A 3D 40 


LD A,(VB) 


;LET V=D-B 


47 


LD B,A 




3A 3F 40 


LD A,(VD) 




90 


SUB B 




32 41 40 


LD (W),A 




3A 50 40 


LD A,(VU) 


;LET D1X=SGN U 


40C0H: CD 88 41 


CALL 4188H 




32 44 40 


LD (VD1X),A 




32 46 40 


LD (VD2X),A 


;LET D2X=SGN U 


3A 41 40 


LD A, (W) 


;LET D1Y=SGN V 


CD 88 41 


CALL 4188H 




32 45 40 


LD (VD1Y),A 




3E 00 


LD A, 00 


;LET D2Y=0 


32 47 40 


LD (VD2Y),A 




40D7H: 3A 50 40 


LD A,(VU) 


;LET M=ABS U 


CD 98 41 


CALL 4198H 




32 42 40 


LD (VM),A 




3A 41 40 


LD A,(W) 


;LET N=ABS V 


CD 98 41 


CALL 9841 H 




32 43 40 


LD (VN),A 




3A 42 40 


LD A,(VM) 


j IF M>N THEN GOTO LINE 


47 


LD B,A 


{NUMBER 1130 


40EDH: 3A 43 40 


LD A, (VN) 




B8 


CP B 




38 1C 


JR C.410FH 




3A 41 40 


LD A. (W) 




CD 88 41 
32 47 40 


CALL 4188H 
LD (VD2Y),A 


1 

;LET D2Y=SGN V 


3E 00 


LD A, 00 


;LET D2X=0 


32 46 40 


LD (VD2X),A 




3A 43 40 


LD A, (VN) 


;LET M=ABS V 


47 


LD B,A 


;LET N=ABS U 


3A 42 40 


LD A, (VM) 


;(IN EFFECT, EXCHANGE M&N) 


32 43 40 


LD (VN),A 




78 


LD A,B 




32 42 40 


LD (VM),A 




410FH: 3A 42 40 


LD A, (VM) 


;LINE NUMBER 1130 


CB 3F 


SRL A 


;LET S=(M/2) 


32 48 40 


LD (VS),A 




3E 00 


LD A, 00 


;FOR 1=0 TO M 


32 49 40 


LD (VI), A 





42 



SYNC Magazine 



4.1 1 CH: 


ED 4B 3C 40 


LD BC, (VA) 


{PLOT A,B 




ED ^3 36 40 


LD ( COORDS), BC 






CD A0 41 


CALL 41A0H 






3A 43 40 


LD A, (TO) 


{LET S=S+N 




47 


LD B,A 






3A 48 40 


LD A, (VS) 






80 


ADD A,B 






32 48 40 


LD (VS),A 






3A 42 40 


LD A, (TO) 


;IF S<M THEN GOTO 1230 




47 


LD B,A 






3A 48 40 


LD A,(VS) 






B8 


CP B 






38 1C 


JR C4158H 




»■ 


90 


SUB B 


;LET S=S-M 




32 48 40 


LD (VS),A 






3A 3C 40 


LD A. (VA) 


;LET A=A+D1X 




47 


LD B,A 






3A 44 40 


LD A, (VD1X) 






80 


ADD A,B 






32 3C 40 


LD (VA),A 






3A 3D 40 


LD A, (VB) 


{LET B=B+D1Y 




47 


LD B,A 






3A 45 40 


LD A,(VD1Y) 






80 


ADD A,B 






32 3D 40 


LD (VB),A 






18 16 


JR 416EH 


;GOTO 1250 


41 58H: 


3A 3C 40 


LD A, (VA) 


;LET A=A+D2X 




47 


LD B,A 






3A 46 40 


LD A, (VD2X) 






80 


ADD A,B 




4160H: 


32 3C 40 


LD (VA),A 






3A 3D 40 


LD A,(VB) 


;LET B=B+D2Y 




47 


LD B,A 






3A 47 40 


LD A, (VD2Y) 




416AH: 


80 


ADD A,B 






32 3D 40 


LD (VB),A 




416EH: 


3A 42 40 


LD A, (VM) 


{LINE NUMBER 1250 




47 


LD B,A 


;NEXT I 




3A 49 40 


LD A, (VI) 






3C 


INC A 






32 49 40 


LD (VI), A 






B8 


CP B 






DA 1C 41 


JP C411CH 






C9 


RET 


; RETURN TO CALLING PROGRAM 


1 4188H: 


FE 00 


CP 00H 


;SIGNUM (SGN) SUBROUTINE 




20 01 


JR NZ.418DH 


{CALL WITH ARGUMENT IN A 




C9 


RET 


{REGISTER 


■ 418DH: 


FA 93 41 


JP M.4193H 


{LEAVES RESULT IN A REG. 




3E 01 


LD A.01H 






C9 


RET 




B 4192H: 


3E FF 


LD A.FFH 






C9 


RET 




4198H: 


CB 7F 


BIT 7, A 


{ABSOLUTE VALUE (ABS) ROUTINE 




28 03 


JR Z.419FH 


{CALL SAME WAY AS SIGNUM (ABOVE 




2F 


CPL 




■ 


C6 01 


ADD A, 01 II 




419FH: 


C9 


RET 




B 41A0H: 


3A 40 40 


LD A, (VPL) 


{PLOT ROUTINE 


1 


FE 00 


CP 00H 


{SETS UP COLOR VARIABLE 


■ 


28 02 


JR Z.4U9H 


{AND MAKE MONITOR CALL 


■ 


3E 4B 


LD A.4BH 


{TO BB2H 


41A9H: 


32 30 40 


LD (4030H),A 






CD B2 0B 


CALL BB2H 




1 


C9 


RET 





Sinclair Software SourceBook 

list 
YOUR SOFTWARE 

now for the February catalog 

SELL IT— SHARE IT 

You made it to fit your specific 

needs and it will meet the needs of 

thousands of other Sinclair users 

who will 

ORDER FROM YOU AT YOUR 

PRICE 



software category 

□ Business Applications 

□ Educational 
[] Games 

j Industrial 

□ Home 

Special Hardware if needed 



designed for 
QZX80 
J ZX 81/Timex Sinclair 1000 

minimum of 

□ 1k □ 32 k 

□ 2k □ 48 k 

□ 16 k 64 k 

Brief description (200 characters 
max.) 



Available as 
□ Cassette $ 
^] source list $ 



(US) 
(US) 



Name 

Address 

Street & # .... 
State/Prov 
Zip/ Postal code 



□ Listing(s) 
$10 per listing 

□ Purchase copy(s) 
Sinclair Software 
Sourcebook ($8 ea) 

□ Check or Money order 
J Visa or Mastercharge 

# 
exp /_ TOTAL 

Drivers Software Sourcebooks 
5040 Ocatillo Rd. 
Las Cruces, NM 88001 



.00 



.00 



November /December 1982 



43 



^Otf* SX FOR THE TIMEX-SINCLAIR 1000, ZX81, (AND ZX80 WITH 8K ROM)! 



THEZX81 HOME COMPUTER PACKAGE 



ETCH-A-SCREEN 

Easily paint pictures anywhere 
within the top 17 rows. A moving 
cursor travels up, down, right, left, 
even diagonally, leaving behind 
text, graphics, and inverse charac- 
ters. Keys REPEAT while held 
down. Your drawing can be stored 
on tape... and immediately ap- 
pears when reloaded. Perfect for 
designing screen logos, or just 
doodling on the screen 





COMPOSER 



BILLBOARD 

Use BILLBOARD for messages, 
displays, and exhibits. Type in a 
message of up to 250 letters, and 
press ENTER. A row of giant let- 
ters moves smoothly across the 
screen, repeating your message 
until you press NEW and enter a 
new message. Or, press SAVE and 
store the message on tape. When 
reloaded, the message begins au- 
tomatically. 



CHECKBOOK BALANCER 

Keep a running tabulation of your 
bank account. CHECKBOOK BA- 
LANCER displays your current 
checkbook balance, (up to 
$59,999.99), your latest account 
balance, and a list of up to 22 
transactions which haven't 
cleared the bank. A plastic-coated 
keyboard overlay defines ENTER, 
VOID, CLEAR, and DISPLAY keys. 
And a SAVE key stores the up- 
dated program on tape. 




A keyboard overlay transforms your computer into a four-octave musical instrument which broadcasts music as 
the keyboard is played. Listen to the music through a radio placed beside the computer, or through an amplifier and 
speakers. Or record the music directly onto tape. The last 1 75 notes played are stored in memory, and can be played 
back or edited. EDIT keys let you change notes and single-step forward or backward through the piece. SPECIAL 
EFFECTS keys are used to create unusual sound effects like laser blasts and arcade noises. 



The complete ZX81 HOME COMPUTER PACKAGE, including cassette 
of four programs, manual, guide cards, screen display sheet, musical 
score sheet, and TWO FULL-COLOR KEYBOARD OVERLAYS, is just 
$9.95. Shipping and handling included! $9.95 

From: LAMO-LEM LABORATORIES, CODE209, BOX 2382, LA JOLLA, CA 92038 



For the ZX81, TIMEX-SINCLAIR 1000, and 8K ROM ZX80 or MicroAce 



ITEM 


PRICE 


QTY 


ZX81 HOME COMPUTER PACKAGE 


$9.95 




ZX81 CLASSICS 


$9.95 




ZX81 DISASSEMBLER 


$9.95 




TOTAL 



NAME 



ADDRESS 
CITY 



STATE/ZIP 



Our catalog, with screen display 
and coding sheets, is free! 



Now that you know how to use the 
monitor program, you may proceed to 
type in the entire listing of Line Draw as 
shown in Listing 5 using the deposit (:) 
command. It may take you until midnight, 
but do not despair because the results 
will be well worth the time and trouble. 
When you are finished, type ENTER to 
exit from the monitor, and SAVE the 
program at least twice, due to the some- 
times unpredictability of the Sinclair 
SAVE, and type in the additional test 
lines as shown in Listing 6. 



Now comes the moment of truth. Type 
RUN 1000. If no line appears on your 
screen almost immediately from the bot- 
tom left-hand corner to the top right- 
hand corner, or worse yet, your system 
crashes, you must reLOAD from tape, 
reenter the monitor by typing RUN, and 
carefully recheck your coding. It is helpful 
to have a friend to dictate the listing while 
you look at the screen otherwise you are 
constantly losing your place. If, however, 
the program does work successfully, espe- 



LisllnR 4. Example Lists, GOTOs, and Deposits for ZX Monitor. 



))4082L(16514d) 



))4082G(BC=0001) 



))4082:22 33 44 55 



))4082L(16514d) 

22 33 44 55 EE FF 00 1 1 



List out 8 consecutive memory locations 
beginning with address 4082h. As shown, 
location 4082h would hold the value AAh, 
4083h holds BBh, etc. The list command 
also displays the decimal equivalent of 
the specified address, in this case 16514d. 
This is useful when calling your machine 
program from a Basic program using the 
USR() function, i.e., 
LET L=USR( 16514). 

GOTO location 4082h and start exe- 
cuting the machine language program 
there. The GOTO command also displays 
the contents of the BC register pair in the 
Z80 processor, which is what is left in the 
USR variable after calling from a Basic 
program. 

Deposit the following 2-digit hexadecimal 
values separated by one space into con- 
secutive memory locations beginning with 
the specified address 4082h. 

If we now do another LIST command, 
we can examine our changes. 

You are now ready to have some fun 
on your own with more examples. 



Listing %. 7\ Monitor Deposit Commands for Fntrrlnu 1 inr-Draw 


4082:DD 21 3C 40 2A 10 40 06 




408A:O5 23 7E D6 80 23 16 00 


411A:49 40 ED 4P 3C 40 ED 43 


^092: 5E CB FB CB 23 CB 12 3D 


4122:36 40 CD AG 41 3A 43 40 


409A:20 F9 DD 72 00 DD 23 23 


412A:47 3A 48 40 80 32 48 40 


40A2:23 23 23 10 E4 3A 30 40 


4132:3A 42 40 47 3A 48 40 B8 


40AA:47 3A 3E 40 90 32 50 40 


413A:38 1C 90 32 48 40 3A 3C 


40B2:3A 3D 40 47 3A 3F 40 90 


4142:40 47 3A 44 40 80 32 3C 


40BA:32 41 40 3A 50 40 CD 88 


414A:40 3A 3D 40 47 3A 45 40 


40C2:41 32 44 40 32 46 40 3A 


4152:80 32 3D 40 18 16 3A 3C 


40CA:41 40 CD 88 41 32 45 40 


415A:40 47 3A 46 40 80 32 3C 


40D2:3E 00 32 47 40 3A 50 40 


4162:40 3A 3D 40 47 3A 47 40 


40DA:CD 98 41 32 42 40 3A 41 


416A:80 32 3D 40 3A 42 40 47 


40E2:40 CD 98 41 32 43 40 3A 


4172:3A 49 40 3C 12 49 40 B8 


40EA:42 40 47 3A 43 40 B8 38 


417£:DA 1C 41 C9 


40F2.-1C 3A 41 40 CD 88 41 32 


4188:FE 00 20 01 C9 FA 93 41 


40FA:47 40 3E 00 32 46 40 3A 


4190:3E 01 C9 3E FF C9 


4102:43 40 47 3A 42 40 32 43 


4198:CB 7F 28 03 2F C6 01 C9 


410A:40 78 32 42 40 3A 42 40 


41AO:3A 40 40 FE 00 28 02 3E 


4112:CB 3F 32 48 40 3E 00 32 


41A8:4B 32 30 40 CD B2 0B C9 



IMPORTED GAME CASSETTES 

ZX81 16KS14 95EACH 

TRADER JACK FANTASTIC FUN GAME 

BUSINESS LOGIC — SOUTH PACIFIC LOCAL 

ZX81 MONOPOLY' UP TO 6 PLAYERS. 

SPECIFY EITHER SPANISH. BRITISH OR 

AMERICAN LANGUAGE VERSION 

SAVAGE SOFTWARE, PO BOX 441 

TITUSVILLE. FL. 32780 



The Troiano Software Company is now 
offering for the ZX81 a graphics, games, 
accounting, math and utility package 
with 12 programs in all! Only S4 00 

Troiano Software Company 

PO Box 40 

Nesconset, New York 1 1 767 



CAR LOG 

A new USEFUL suite of professional 
programs for the ZX8 1 ( 1 6K). 
1.) Very simple to use with full instruc- 
tions. 
2.) Complete cassette record of mileage 

and itemised expenses. 
3.) All conceivable ratios, totals and 

projections computed. 
CAR LOG is suitable for your car, your 
dad s car or your whole fleet of trucks. 
Only $14.95 
NIMRODSORTWARE 

4 Stanley Rd., 
London, SW1 4 7DZ U.K. 



ZX-81 SOFTWARE WRITERS 

If you have useful applications for busi- 
ness, education, engineering or unique 
exciting games you could earn good 
money Submit programs on cassettes 
or write details to: 

FRESH TRACKS 27 W. Rayburn Road, 
Millington, N.J. 07946 Phone A/C 201 
647-0970. Prompt reply. 



ZX TYPING TUTOR 

• LEARN ALPHA NUMERIC KEYBOARD 

• THREE SKILL LEVELS 

• INSTANT FEEDBACK AND FINAL SCORE 

• GET THIS HIGH PERFORMANCE 8K/ 1 6K 
LISTING AT BIG SAVINGS 

• ONLY $4.95 FROM 

MICRO-TECH 
1019 BRANDON LAKES AVE 
VALRICO. FLORIDA 33594 



SINCLAIR ZX81 & TS1000 SOFTWARE 
Fifty games for less than $2 ea. 
Send SASE for FREE catalog to: 

BIOCAL SOFTWARE 

340 Cypress Dr. 
Fairfax, Calif. 94930 



SANTE FE INDUSTRIES-soon to be the biggest 
name in software/hardware for the Timex/Sinclair 
and Commodore Computers. Will send you (for S3. 00 
s & h) software/hardware information on. 16K RAM, 
I/O, Rtty, CW, Satellite antenna pointing, contest log- 
ging, accounting, inventory, classroom, mail list, etc. 
included-over 30 1KZX/T imex programs, ZX80to81 
conversions, error table SANTA FE 2342 S. Dun- 
dee CT . Highland. Ml 4803 1 

SIMPLY THE BESTI 



November/December 1982 



45 



Listing 7. Additional Example Programs for Line- 
Draw. 



cially the first time, you are eligible for 
the award for BEST-TYPER-OF-THE- 
YEAR. Now carefully delete each line of 
the Basic monitor program (remember 
never to type LIST, only LIST 10) all the 
way to line 1060 starting with line 10 by 
typing in the line number followed by 
ENTER. Now carefully SAVE this final 
version at least twice. To use this final 
version of Line Draw, all you do is set 
aside five variables (i.e., A-E) in your 
Basic program and set them to zero with 
the LET statement at the very top of your 
program (i.e., line 10). Do not declare 



any other variables before these five in 
order that Line Draw will be able to 
correctly find them. When you wish to 
plot a line during the course of your 
program, simply set the first two control 
variables (A and B) to the X and Y coor- 
dinates of the first endpoint of the desired 
line, the second two variables (C and D) 
to the coordinates of the second endpoint 
and the fifth variable (E) to if you want 
to unplot the line, or to 1 to plot the line. 
Super simple, super fast. Some additional 
program examples to try with Line Draw 
are found in Listing 7. 



1000 LET A 





(1st X coordinate) 


1010 LET B 





(1st Y coordinate) 


1020 LET C 


63 


(2nd X coordinate) 


1030 LET D 


43 


(2nd Y coordinate) 


1040 LET E 


1 


(Set plot to black) 


1050 LET L 


USR 16514 


(Call machine 
routine to draw 
line from A,B 
to C,D) 


1060 STOP 




(Done) 



10 
sa 

30 

4.0 

50 

60 

70 

80 

90 

100 

110 

120 

130 

140 

1S0 

160 

170 

180 

190 

200 

10 

20 

30 

40 

50 

60 

70 

EXT) 

80 

90 

100 

110 

120 

130 

14.0 

150 

160 



REM ASTERISK 

LET R=0 

LET B=0 

LET C=0 

LET D=0 

LET E=l 



TO 43 STEP 5 



FOR Y=0 

LET R=0 

LET B=Y 

LET C = 63 

LET D=43-Y 

LET L=USR 16514 

NEXT Y 

FOR X=0 TO 63 STEP S 

LET R=X 

LET B=0 

LET C=63-X 

LET D=43 

LET L=USR 16514 

NEXT X 

REM SHAPE -DRflU 

LET O=0 

LET B=0 

LET C=0 

LET D=0 

LET E=0 

LET R*=" (SEE EXPLANATORY T 

FOR X=l TO LEN R* 5TEP 10 

LET fl=ORL fl»(X TO Xtl) 

LET B=UftL R*(X«-2 TO X+3) 

LET C=ORL R*(X+4 TO X+5) 

LET D=UBL R«(X+6 TO X4-7) 

LET E=0 

IF R$ (X+8) ="P" THEN LET E=l 

LET L=USR 16514 
NEXT X 



RUN 1000 

(A line should immediately appear on the screen from 0,0 to 63,43) 



Note: The Shape Draw program draws 
a shape on the screen given endpoints of 
lines that define the shape desired coded 
into the text of the variable A$. For each 
line to be drawn, the endpoints are 
specified and PLOT/UNPLOT is selected 
by the letters P or U respectively. For 
example, to draw a box on the screen the 
following data could be put in A$: 
"00001000P 10001010P 10100010P 
OOIOOOOOP". H 



Get on the Control Bus 
for only $49. 95 r tr.p d 
- - - and be on TIME. 



8 lines departing 

(output! capable ol driving ralaya) 

S lines arriving 

(TTL compatible tnputa] 



With our real Time Clock and Calendar 

Compatible with ZX80/81 
MicroAce S TIMEX 1000 
All accessories can be connected together 
and separately controlled from the I/O Ports 



TIME 



MONTH 



DATE YEAR 



99 



DAY OF WEEK 

7 



33 53 59 13 - 31 

• Leap yaar correction 

• 12/24 hour format 
e 30 eecond time correction 

(hardware or eoftware) 
O Battery beck-up circuit! 

Comee complete with 

• All software needed to operate clock and 
InpuVOutput ports 

• On board 5 volt regulator 

• Feed through Sinclair Bus connector 
to allow normal expansion 

• Each port is expandable through Multiplexing 

• I/O ports and other controls mate with Radio Shack " 
44 pm edge socket 

• 90 day Warranty 

Acceeeoriee ueed with I/O Board: 

• A to D and D to A converter 

• Wireless control system compatible with BSR * 
modules 

• Solid state 25 amp switch modules 

• S SPDT 5 amp relay card 

Future producte uaed with I/O board: 

• Touch Tone' encoder/decoder and 
other telephone products 

• Speech synthesizer 

• Sound synthesizer 



Model Description 


Pnce 


310 


I/O pore with real time clock (Built and tnatnd| 


$49 95 


315 


PC board and manual of #31 O 


$24.95 


320 


A to D and D to A converter (Built and taacad) 


$39 95 


325 


Bare A to D and D to A board and manua- 


$1995 


330 


Wireless control system (Built and taatad) 


$54 95 


34D 


Solid State" AC switch (Built and taatad) 


$19 95 


350 


Relay board (Built and taatad| 


$69 95 


317 


Clock IC and crystal (Taatad) 


$12 95 




Shipping and handling 


$ 3.95 



Orders 
For ma> 



accepted Dy p 
orders, send cr 
orders must De 



One Or mail 



Cai'for b ado 6<te tax 



oorey order 



write for free catalog 




P.O. Box 3295 
Escondido, CA 92025-0580 
Information (619) 741-5132 
24 HOUR ORDER LINE ONLY 

NAT. 800-227-1617 
Calif. Res. 800-772-3545 
Aak for operator 367 



(No catalog calla pleasal 



SOFTWARE BY 
C.E.D.CORPORATION 

E-Z BOOKKEEPING FOR SMALL BUSINESS (TAKES LESS 

THAN Vi HOUR PER MONTH). ALSO GOOD FOR 

HOUSEHOLD BUDGETING. 

CHECKING ACCOUNT (MAKES CHILDS PLAY OF THIS 

JOB) 

BY-IT-SELF ITS GREAT BUT IT WAS DESIGNED TO WORK 

WITH E-Z BOOKKEEPING 

MACHINE LANGUAGE NIT-PICK (GREAT FOR LEARNING 

ASSEMBLY LANGUAGE PROGRAMING) 

WORD PROCESSOR (IT WAS USED TO WRITE THIS AD) 

ORDER FROM C ED. CORPORATION 
P O BOX 222. SALEM, WISCONSIN 53168 



PRICE LIST 



E-Z BOOKKEEPING 
CHECKING ACCOUNT 
ABOVE TWO AS A 
PACKAGE 
ML. NIT-PICK 
WORD PROCESSOR 



TAPE LIST BOTH 
$1995 $ 8.95 $27.95 
$ 995 $ 5.95 $14.95 

$41.95 

$18.95 

$1895 $ 795 $2595 



SPECIFY ZX80-1 OR TRS 80 COLOR COMPUTER 
ZX80-1 SNEED 16KRAM 
TRS 80 NEEDS 16K RAM 

ALL OF OUR PROGRAMS ARE MENU DRIVEN AND ALL 
DATA CAN BE STORED ON TAPE AND OR SENT TO A LINE 

PRINTER 

WE HAVE TELEPHONE SUPPORT FOR PROBLEMS OR 

QUESTIONS 

CALL (414) 276-8787 

We guarantee replacement of defective tapes 



GET SMART! 



Dee Saartvare eoftwarel V* ipeclalize In providing a of Ware for 'full-blown* 
Tiaax / Sinclair personal coaputsra. Oar progress can help you realise the 
fall potential of your machine, for both entertainment and application*. 

NEW RELEASES: 

1. Ja—e Bond Adreotare #1 - A unique adventure «*■*, in vbiob you suet 
help 'Agent 007' aake the ri£bt deoiaione to ooaplete his aieelon. Of 
oouree, you will travel to exotic placet, fight against overwbsljaine; 
odds, and hopefully save the world* 

2« ZX Tahtass - The olasslo dioe gas* of atrategy and luck, played on a 
computer, for one to four players. 

3. Wharrl - Baaed on an ancient African gas* that was played with beans 
and bowls. How you will need concentration and ounning to outwit the 
coaputsr. 

*• Hailing List / Phone Dlreotory - Store the address and/or tslephons 
number for up to 100 people. Search for entrloa in a variety of waya. 

STANDARD FEATURES: 

1. All prograas will ran on Sinclair ZX81 and Tiasr 1000 cosrputsrs with 
161 of BAM. 

2. Software ie shipped on certified error-free data casasttss. with each 
program recorded twice on the oassstts (just in oass one copy gets 
acoidsntally erased). 

3. Instructions are supplied as part of each program, rather than on 
aeparats papsrs which tend to get ■isplaoed. 

4. Each program is available on caeeette, or in listing form (if you 
really snjoy typing). 

TO ORDER: 

Sand a check for $9.95 for each caeeette, or M.95 for each lilting, toi 
Ssmxtvaxs, P.O. Box 1491, Melbourne, Florida 32935 



Run-it 



TS/ 1000 — Sinclair ZX-81 

Software Club 



January Feature Program 



REAL ESTATE ADVISOR 

Whether you have one tenant or several buildings. 
Real Estate Advisor can organize the information 
you need to keep investments, expenses and cash 
flow in control, plus calculate rate of return on 
your investment. Real Estate Advisor also lets you 
do budgets, projections and shows you the results 
of what-if situations and calculate estimated future 
rates of return. It's a lot of program at a price you 
can easily manage. (16K) 

Suggested Retail $16.95 #14-10A-11 

Feature Price Good Through 1/31/83 $10.95 



Additional Selections 



GRAPH-IT (16K) 

Graph-it plots user supplied equa- 
tions as variables rather than pro- 
gram statements (no reprogram- 
ming necessary.) Three dimen- 
sional graphs also possible. 
Sug. Ret. $16.95 »12-4A-11 

Run-it Price: $14.95 

LAB ASSISTANT (16K) 

Scientific reference and teaching 
program includes: curve fitting 
of peaks and valleys, periodic 
table with atomic weights and 
numbers plus orbitals and more, 
molarity/normality, PPM/weight 
converter, metric converter. 
Sug. Ret. $19.95 #11-4B-11 

Run-it Pricaj $10J}5 



MASTERTHINK (16K) 

Play against the computer and it 
will choose a 1 to 6 digit number 
then tell you which digits and 

Positions you guess correctly, 
lay with another person and you 
choose. 

Sug. Ret. $13.95 «15 2A11 

Run-it Price: $11.96 

HIGH LEVEL MATH (16K) 

Learn advanced math principles 
including: geometric function, 
circular and hyperbolic trigono- 
metric functions, half ana full 
incremental integration, differ- 
ential equations. 

Sug. Ret. $12.95 #11-4A-11 

Run-it Price: $10.95 



2K Korner 



WORDPLAY #13-2A-11 

2 games: Scramble & Cipher 

Sug. Ret. $9.95 Run-it Price: $7.95 

COMPUTER AWARENESS I .13 8A11 

4 programs including doing your own menu 
Sug. Ret. $7.95 Run-it Price: $6.95 

ARTIST #13-6A11 

Drawing graphics for floor plans, letterinq. etc. 
Sug. Ret. $12.95 Run-it Price: $11.95 

MESSAGE CENTER #1368 11 

Combines Artist & continuous message prograrr 
Sug. Ret. $19.95 Run-it Price: $14.95 



HOME RECORDS 

Filingand sorting records 
Sug. Ret. $13.95 



• 13-6C-11 
Run-it Price: $11.95 



USE THIS 

HANDY 

ORDER 

FORM 

NOW AND 

START 

RECEIVING 

OUR 

MONTHLY 

CATALOG. 



Check your selection(s): 



□ 14-10A-11 
012 4A-11 

□ 15-2A 11 

□ 11-4A-11 

□ 11-4B-11 



□ 13-2A 11 

□ 13-8A 11 

□ 13-6A-11 
013-6B-11 
013-6C-11 



Send to: 
Run-it Software 
732 S. Sherman 
Chicago, IL 60605 



If paying by check or money order, indicate amount enclosed 

(III. res. add 6%) $ 

If paying by Master Card or Visa complete the following: 

Card « 



Bank • (MC only) 

Exp. Date 

Signature 

Name 



Address . 
City 



State 



Zip 



4K ROM 
IK RAM 



Flicker-free Four Times Normal 
Character Scrolling 



Richard Van Workum 



Programming an active display with- 
out the flicker and flash is one of the 
challenges confronting the ZX80 user. 
So far the programs published in SYNC 
with flicker free display possibilities 
have some limitations: 1) the program 
must stay in machine language; 2) all 
computing must be done during the 
vertical blacking period; or 3) everything 
must be timed just right. We have had 
lateral scrolling for one line, but this 
scrolling is not suitable for a billboard 
because it is hard to read at a distance. 
Another program would display a mes- 
sage in characters eight times their nor- 
mal size, but not enough information 
can be displayed on the screen at one 
time. 

A Flicker Free Message Program 

The program presented here is devel- 
oped from several articles in SYNC. As a 
compromise between the two extremes, 
it will continually scroll a flicker free 
message, held in the 2 REMark state- 
ment, with characters four times their 
normal size. 

The first 45 bytes in this program 
store variables, lists, and tables that the 
program will use. The program starts at 
USR (16472) where it initializes the pro- 
gram variables in the first 45 bytes. See 
Figure 3. 

The next part of the program creates a 
complete display of 24 lines. This rou- 
tine is based on Dr. I. S. Logan's article 
"How to Produce a Display File Using 
Machine Code" in SYNC 1:2. Creating 
the display file starts at 16494 (see Fig- 
ure 4). The routine inserts seven 
NEWLINE characters (118) making six 
blank lines. Then it makes 4 full lines of 
spaces to make room for the message to 
be scrolled. To complete the display 14 

Richard Van Workum, 920 Leslie Ln., Hanford, CA 
93230. 



48 



more NEWLINE characters are in- 
serted. At the end of this routine the 
DF-EA, DF-END, and LINE 
COUNTER are set so the program can 
return to Basic. 

The Display Routine 

The display routine was based on an- 
other article by Dr. Logan, "Auto-Dis- 
play-Changing" (SYNC 1:3) although I 
have made many changes. The display 
changers in this Horizontal Scrolling 
program are written in machine lan- 
guage so this program does not have to 
return to Basic. As in Dr. Logan's pro- 
gram most of the display routine is 
copied from the ZX80's 4K ROM. The 
display routine for the 4K ROM is listed 
in SYNC 1:3, p. 44. 

The vertical blanking period starts at 
IN A (C) and lasts until OUT (OFFh) 
A. Just before the OUT instruction there 
is a timing loop of DJNZs. I eliminated 



this loop and inserted the timer-control- 
ler so now this is where the Horizontal 
Scrolling program does all its comput- 
ing. Obviously the scrolling routines 
take more time than the DJNZs; how- 
ever, this does not cause any problems 
with the vertical sync. 

Each time the timer is decremented, a 
different subroutine is called. The sub- 
routines are 2 REM reader, 1st quarter 
of expander, Nth quarter of expander, 
32nd position list. One of these routines 
is run before the display routine contin- 
ues out of vertical sync and jumps back 
to its beginning. If the timer has done all 
the needed subroutines before it reaches 
zero the program will cycle through the 
expander until the timer decrements to 
zero. Then it is reset to the value in 
16453 and calls the display changer rou- 
tine. After the changes are made, the 
display routine continues out of vertical 
blanking and jumps to its beginning. 



Figure 2. Lists, Tables, and Variables. 



16427 


27 


Hold 
cons 


s character 
truct i on 


16450 


27' 


Holds address 
o-f character 






di sp 


1 acement 






•in 2 REM to 






<t. 


3, 5, 7, 9) 






be expanded 


16428 


27 


Hold 


s graphic 




27_ 








list 
•for 


di spl acement 
expander 


16452 


27 


Holds timer 






d. 


5, 9., 13, 17) 






countdown 


16429 


27 " 










var i abl e 




27 






16453 


10 


Holds timer 




27 










constant 




27 
27 






16454 


1 19 


Holds -first 




27 










address in 




27 










2 REM message 




27 




Graphic list 




66" 






27 






16456 









27 








4 






27 








6 






27 








2 






27 








5 






27 








131 






27 








8 






27 








135 


' Table of graphics 


16445 


2T : 








7 






27 


-..'.•X. 


nd position 




136 






27 


~ li 


St 




3 






27 








133 




16449 


27 


Hold 

•for 

posi 


s displacement 

32nd 

t i on 1 i st 




1 30 
134 
132 








to, 


1, 2, 3) 


16471 


128. 
















SYNC Magazine 



"IF I HAD TO CHOOSE 

JUST ONE PROGRAM 

TO IMPRESS AN AUDIENCE 

WITH THE CAPABILITIES 

OF THE TS1000/ZX81, 
THEN 3D MONSTER MAZE 

WOULD BE THE ONE'" 



1 



"The Graphics Are 
Incredible"* 

"Finest Machine 
Code Games 
Available"! 

"Brilliant... 
Undoubtedly One 
Of The Best"* 



3D MONSTER MAZE 

Gamestape 4 

Actual screen TS1000/ZX81 




Reviews are from 
*ZX COMPUTING 
t John Rowlands, Product Manager 

UK's largest Sinclair distributor 
•Personal Computer World 



Iff! I 

iV/i 



MELBOURNE 
HOUSE 
SOFTWARE INC. 



Orders to: 

MELBOURNE HOUSE SOFTWARE, INC. 

Dept. CS 

347 Reedwood Drive , Nashville, TN 37217 



Visa and M / C orders 
can be phoned in: 

615 361-3738 



13941 Gamestape 1: 11 Programs— 1K 

13942 Gamestape 2: 3 Games-16K 

1 3943 Gamestape 3: Catacombs Adventure— 16K 

13944 Gamestape 4: 3D Monster Maze— 16K 

13945 Gamestape 5: 3D Orbiter-16K 
PLUS BOOKS: 

26025 NOT ONLY 30 PROGRAMS FOR THE ZX81 

25957 MACHINE LANGUAGE PROGRAMMING MADE SIMPLE 

25913 UNDERSTANDING YOUR ZX81 ROM 

26063 ZX81 ROM DISASSEMBLY-PART A 

26103 ZX81 ROM DISASSEMBLY-PART B 

25895 COMPLETE BASIC COURSE FOR TS1000/ZX81 

PLUS TAPES: 

26446 SPACE TREK -16K 

26359 SUPER INVASION-1K 

26318 WALLBUSTERS-1K 

26472 10 EXCITING PROGRAMS-1K 

26284 REVERSI-1K 

26406 TOOLBOX- IK 

26490 BASIC COURSE 2 cassette pack 



Dealer orders and queries: 

800/251-5900 

(ask for a Melbourne House operator) 



Price 
14.95 
14.95 
14.95 
14.95 
14.95 

14.95 
19.95 
19.95 
14.95 
14.95 
34.50 



Signature. 
Address— 



1495 
14.95 
14.95 
14.95 
14.95 
14.95 
7.50 
Total 
Residents of CA, MD, TN, please add sales taxes 

S&H 
Total 

Enclosed is my check or money order for $ 

Please charge my Visa or MasterCard Card # 



Quantity 



Total 



2.00 



expiration date_ 



.Name. 
. City 



State . 



Zip. 



2 REMark Reader 

When this subroutine is called, the 
next character from 2 REMark is in- 
serted into the expander subroutine. The 
2 REMark address is incremented and 
its contents checked for NEWLINE 
(118). See the flow chart. If it is not 1 18, 
then the 2 REMark address is stored in 
memory 16450. If it is 118, then the 2 
REMark is incremented again and 



checked for the higher order byte of the 
line number for the next Basic instruc- 
tion. This would signal the end of the 
message. Since 

500 LET K = USR (16472) 
is the next instruction in Basic, the high 
order byte is 1. If the check does not find 
a 1, the address is stored in memory 
16450. If the check finds a 1, the address 
is initialized back to the first character 



Figure 3. Initialization. 



Address 

16472 
164?5 
1647S 
16481 
16484 
16485 
16488 
16490 
16491 
16492 



Decimal 

42, 70, 64 

34, 66, 64 

33. 31. 65 

y*. 2. 65 

175 

33. 61, 64 

6, 5 

119 

35 

16, 252 



Mnemonic 



LD HL, (NN) 
LD (NN), HL 
ID HL, NN 
LD (HK), HL 
X0H A 
LD HL, NN 
LD B, N 
(1) LD (UL), A 

inc HL 

DJNZ DIS (1) 



Comment 

get first address In 2 REM message. 

put in address of character In 2 REK to expand. 

load HL with start of 2 Ri-H reader. 

load controller in timer. 

load A Tee:., with 



Initialize line changer displacement & 
32nd position list to 0. 



in the 2 REMark instruction and stored 
in memory 16450. 

Because there are several branches in 
this subroutine, timing loops have to be 
inserted. The longest branch takes place 
when the 2 REMark Reader is initial- 
ized back to the first character address. 
This branch takes 70 machine cycles. 
When the 2 REMark Reader just in- 
crements to the next address it only 
takes 12 machine cycles. A 58 cycle loop 
was inserted so these branches would 
take the same amount of time. Another 
28 cycle loop was inserted for when the 
routine found only a NEWLINE 
character. A third timing loop was in- 
serted at the end to keep the whole rout- 
ing synchronized with the other 
subroutines. A list of machine cycles for 
each instruction is found in Z80 Assem- 
bly Language Programming by Lance A. 
Leventhal. 

The Expander Routine 

The expander routine makes a list of 
graphics from the characters found in 



STABILIZER PAD FOR THE ZX 80, 81 and TS 1000 




e ELIMINATES SLIDING 

• ELEVATES AND TILTS KEYBOARD FOR LESS FATIGUING, MORE 
ACCURATE TYPING 

• PROVIDES NEEDED GRIP FOR 16K MODULE; PREVENTS GIGGLING 
& LOSS OF PROGRAM 

• NEATENS WORK AREA WITH BOTTOM CAVrTY FOR MANUAL AND A 
CASSETTE HOLDER 

e 2 YEAR WARRANTY 



THIS IS A HIGH QUALITY DURABLE ELASTOMERIC PAD 

$7.49 ea + $1 . handling and Postage. SEND CHECK & ORDER TO: 
ZOPF INDUSTRIES 121 W. Mt. Hope, Lansing, Ml. 48910 




16KZX-81 SOFTWARE 

FOR THE HOME 

CHECKBOOK BALANCE 

ENERGY ANALYSIS 

VIDEO CALC 
EDUCATIONAL: 

ARITHMETIC TUTOR 

ALGEBRA TUTOR 

SPANISH TRANSLATOR 
ENTERTAINMENT: 

ANIMAL QUIZ 

PLAY THE MARKET 

ENCRYPTOR 
EACH ON A HIGH QUALITY C- 1 
CASSETTE @$9.95 EACH 
SEND SASE FOR PROGRAM 
DESCRIPTIONS 

P & B SOFTWARE 

1 155 E.MALIBU DRIVE 

TEMPE AZ 85282 





50 



Mr. Berch has it! 
ZX81 Assembler 

2 pass. Standard Mnemonics 

Symbolic Expressions 

Decimal/Hex 

12K Basic & mach code 

ZX81 Disassembler 

Std mnemonics, Dec/Hex output 
Assembler plus disassembler 
$15 ppd (cassette) 

Serial Printer interface 

(thru mic port) plans & listing 
RS-232 ASCII output $5.00 ppd 
NY res. 

Bob Berch add7% 
\\ 19 Jaques St. 

\\ Rochester, NY 1 4620 



SYNC Magazine 



PROGRAM FASTER! 

Now you can write and revise program listings faster than ever 
before. Never again count spaces for PRINT, PRINT AT, and 
PLOT functions. ROMARK SCREEN PADS are a larger, im- 
proved version of the ZX Basic Hand Book (page 89) showing 
line, column, and pixel numbers. We use heavy erasable paper. 
50 sheets per pad.. 

FIVE SCREEN PADS (250 sheets) $7.95 

"LEADFOOT" SILICONE FEET 4 for $1 .50 
3-RING BINDER FOR 5V2X8V2 

SCREEN PAD SHEETS EACH 3.50 

SHIPPING AND HANDLING 2.50 

Send S.A.S.E. for Screen sheet sample & join our mailing list 

Graphics courtesy of Alan R. Greenleaf 

2X Tt IMO SCfttfN utvOUT 



100 
200 

300 



R 




OMARK INDUSTRIES, INC. 

20412-30 CENTER RIDGE RD. 
CLEVELAND, OHIO 441 16 



KEYBOARDS 



IF YOU DON'T MIND DOING IT YOURSELF, YOU 
CAN HAVE THE MOST FUNCTIONAL. AND EASIEST 
TO USE KEYBOARD AVAILABLE FOR YOUR ZXS1 
OR TIMEX SINCLAIR 1000. FEATURES 73 FULL 
SIZE KEYS WITH 46 AUTOMATICALLY SHIFTED 
FUNCTIONS, CONVENIENT EDITING/GAME KEYROW, 
AND SPECIAL GRAPHICS SECTION. 

WE WILL SUPPLY THE DOUBLE SIDED PC BOARD. 
3 COLOR SILKSCREENED KEY LEGENDS, PARTS 
LIST, AND COMPLETE INSTRUCTIONS FOR $30 OR 
WE WILL SUPPLY THE ENTIRE KIT FOR $80. 



RESEARCH APPLICATIONS PRODUCTS 

4561 Paloma Lane 
-_JfLo_rba L i n d a , CA. 92686 



ALLOW 4-8 WEEKS FOR DELIVERY. INCLUDE 
$4 FOR SHIPPING AND HANDLING. CALIFORNIA 
RESIDENTS ADD 8 PERCENT SALES TAX. FOR 
ADDITIONAL INFORMATION SEND SASE. 




EDUCATION 
ENTERTAINMENT 

Personal Management 
1 6K Software On Cassette 



ZK-PARTY GAMES $9.95 

Five Games for Hours of Party Fun. 

Includes Charades (500 topics), Password (500 words), 

Improv-Skits, Gossip, and "Radio DJ ". 

PARTY GAMES FOR CONSENTING ADULTS $14.95 

Contains five games designed to entertain a gathering 
of close friends. Strip/Trivia, pits your knoweldge of 
trivia against your clothes. In "Body Twister the com- 
puter tells players where to place their hands, feet, etc. 
on other players. Three others. Write for information. 

ZK FOOTBALL $12.95 

This textual version of football features 12 off. players, 8 
defenses, solitaire or dual plays, auto time keeping, 
individually designed teams, and full team stats (includ- 
ing printer output). Plastic keyboard overlay. 
ZK BASKETBALL RELAYS (AVAILABLE 
NOV.1.) 

Teams include 8 individually rated players who shoot, 
rebound and defend as in real life. Solitaire or two play- 
ers, 1981/82 Pro (23 teams) or College Top 25. $19.95 
each. 

PRIMARY ASSOCIATION $9.95 
A good way to introduce your three-six year old to com- 
puters, while reinforcing school work. Provides drills for 
matching, association, and basic comprehension. 

ARITHMETIC BASEBALL $9.95 

An entertaining educational program where children 
and adults compete evenly while learning. Questions 
range from simple counting to trig. Correct answers 
result in hits according to relative difficulty. 

HOME MANAGER $12.95 

This menu driven program stores info on 50 families 
(enough for most) on each cassette. Names, address, 
phone, and four lines of miscellaneous data (up to 8 
important dates). Sort on names or dates. Also includes 
printer output for address labels or complete files. 



WE OFFER A COMPELTE LINE FOR EDUCA- 
TIONAL, GAME, HOME AND PERSONAL 
MANAGEMENT PROGRAMS FOR THE ZX81 
AND TIMEX 1000. 

CATALOG $1.00 CREDITED TOWARD FIRST 
ORDER. 



ZOR KHAN 

INDUSTRIES 

BOX 31 567 

Aurora, Colorado 80041 

Full replacement warranty en all tapes. Add $1.00 
postage and handling. Colorado residents add 6.5% 
tax. Send check, money order, or VISA-MASTER 
CARD Acct. #, Exp. Date, and Signature. No COD. 
Please. 



Figure 4. Making the Display File. 



Address 

I6i*9? 
16+9P 
I6501 
16502 
16503 
I6505 
I6507 
I650P 
I6510 
16511 
16513 
16515 
1651 6 
I651? 

16520 
I6522 
16523 
16524 
16526 
16529 
16532 
16533 



Address 



(3) 
(2) 



Decimal 

1. 11?, 7 

12 

h?., 12, (M 

35 (1) 

113 

16, 252 

6, * 

19? 

6, 32 

35 

5+, 128 

16, 251 

35 

193 

113 

16, 2^3 

6, \k 

35 

113 

16, 252 

Jk, Ik, (h 

34, 16, 6+ 

175 

50, 37, 64 



H 



(*) 



Mnemonic 

LD BC, NN 

INC C 

LD HL, (IW) 

INC HL 
LD (HL), 
DJNZ DIS 
LD B, N 
PUSH BC 
LD B, N 
IRC HL 
LD (HL), 
DJKZ DIS 
INC HL 
POP BC 
LD (HL), 
DJNZ DIS 
LD B, " 
INC HL 
LD (HL), 
DJNZ DIS 
LD 
LD 

XOR A 
LD (KM), 



11^ JJJ..J 

83: 



Comment 

load 3 reg. for 6 top lines, 
load C reg. with newllne. 
get start of display file, 
point to next line, 
load line with newllne. 

(1) repeat for 6 lines, 
load B reg. for next 4 lines. 
save B reg. 

load B reg. for 32 spaces, 
point to first space in next line, 
load in inverse space. 

(2) repeat until line is full, 
point to newline position. 
get B reg. 

C load In newline. 

(3) repeat for 4 lines, 
load 3 reg. for bottom 14 lines, 
point to next line, 
load line with newline. 

(4) repeat for 14 lines. 
HL tell DF-EA where field ends. 
HL tell DF-END where field ends. 

load A reg. with 0. 
A load line counter with 0. 



Figure 5. The First Part of the Display Routine. . 



Decimal 

6, 1 



Mnemonic 

LD B, N 



16536- 
165391 

to U copy 4k rom from 321 to 403. 
16620J 



Comment 

load timing cycle with 1 . 



the 2 REM instruction. The list of 16 
graphics starts at memory address 16429 
(see Figure 2). Because this routine takes 
so long, it was divided into four parts. 
Four graphics are listed each time the 
routine is run. 

The actual construction of characters 
is stored in ROM starting at address 
3583. To see how each character is 
formed multiply the code of a character 
by 8 and add 3583. Increment the an- 
swer and PEEK into that address. This 
will give the first byte of the character 
construction. Increment and PEEK 7 
more times to get the full character. See 
Figure 13 below. 

Figure 13. Character Construction. 



C0DE(8A>=38 Deciir 

PEEK (38*9+3583+1) = 

PEEK (38*8+3583+2) = 62 

PEEK (38*8+3583+3) = 65 

PEEK (38*8+3583+4) - 65 

PEEK (38*8+3583+5) = 127 

PEE) (38*8+3583+6) - 65 

PEEK (38*8+3583+7) = 65 

PEEK(38*8+35B3+8) = O 



Binary Bit 
76543210 

oooooooo 

001 11110 
01000001 

01000001 
01111111 
01000001 

01000001 
'000 



Note that the binary l's form an A. 

The expander starts by initializing the 
character construction displacement and 
graphic list displacement to one. Then it 
takes the code of the character to be ex- 
panded, multiplies it times 8, adds 3583, 




CRASH GUARD" 

PROTECTS YOUR ZX81 

AND 16K RAM MODULE 

$19.95 

* Eliminates crashes caused by bumping 
the 16K RAM module 

* Helps prevent accidental unplugging of 
your 16K by small children 

* Now you can move your computer with- 
out worry 



The CRASH GUARD is made of Heavy Gauge Bronze- 
Colored Acrylic. It has been designed to give you a 
rugged work base. At the same time, it virtually elim- 
inates crashes caused by bumping the computer or 16K 
module. 

To order by phone, call (816) 353-1690 



NAME. 



ADDRESS. 
CITY 



.STATE. 



.ZIP. 



.CRASH GUARDS® 
Acct. No. 



Please send me 

$19.95 each 

d Check Enclosed 

□ Master Card 

□ Visa 

Allow 2 weeks for delivery ' 

EXPENSE CUTTER PRODUCTS. INC. 
P.O. BOX 9543 • RAYTOWN, MO 64133 



Exp. Date 



52 



SYNC Magazine 



LOVE AT FIRST BYTE 






C-20 Magazine has something for every TS- 1000 or 
ZX-81 owner to love each month. We offer 2K and 
16K programs in each issue. 

Educational Software 

Software for your Home 

Games Games Games 

Editorial Section 

The C-20 Mailbox 

Classified Ads 

A Big Time-Saving Value. Less ihan $4.20 per issue 

with over 75 programs per year. That's less than 66 

cents per program! 



Big Savings if you order Now! 

1 Year (12 issues) $49.95 

after Dec. 25 59.95 

6 Months (6 issues) 34.95 

after Dec. 25 38.95 

Kansas residents add 3%. First class mail included 
in North America. All others add $10 per subscrip- 
tion. 




24 Hr. Toll Free Order Une 
i -600-835 2246 Ext. 240 

or in Kansas 
1-800-362-2421 Ext. 240 

VISA and MasterCard 



P.O. Box 3801 
Wichita, Ks. 67201-3801 



515 N. Ridge Road / Suite B 
Wichita, Ks. 67212 



F»R I NTER 



IMTERFRCE 



CENTRONICS STYLE PflRHLLEL PORT PRINTER INTERFRCE 
ENABLES USER TO PRINT ALPHWNUI1ER 1 CS AND SELECTED 
GRAPHICS SYMBOLS USING THE 6K-16K ZX-BB.ZX-ei. BR THE 
TIME* 1080 WITH THE RXIOH GP-100P PRINTER. 

with other C»ntr-onic« St«nd»rd 



PRINTER COMMANDS RNO rVL PROGRRMS ARE STORED In An 
9K MEMORY AREA NOT USED BY COMPUTER. PROGRAMS ALLOW 
PRINTOUT OP LISTINGS. SCREEN DISPLAYS. MVL CODE. TEXT-- 
32 COLUMNS POP LABELS. WIDE LETTERS, ETC. - OR 63 COL- 
UMNS WIDE FOR LETTER-SIZE PAPER. 



CASSET'E PROGRAMS I '0 BOARD (SEE LEFT ) . «*£XTRA BK 
ROM BOARD WITH ZK ROM AND 2K CMOS RAM**, ANT WITH 
COMPLETE INSTRUCTIONS $133 



CUSTOM PROGRAMMED 2K ROMS tl3 



I^O BORRD 

PROGRAMMABLE B233 PIO BOARD FOR MICROACE. ZX-80. 2X-B1 
OR TIMCX 1900 (8K-16IO CAN BE USED WITH ONE INPUT PORT 
AND TWO OUTPUT PORTS. OR THREE OUTPUT PORTS. EACH LINE 
CAN BE TURNED ON OR OFF ON ONE OUTPUT PORT. 



FOUR OUTPUT LINES PROGRAMMABLE WITH 1US. 
RESET LINE BROUGHT OUT ON I '0 BOARD. 



I'O BOARD WITH PROGRAMS AND INSTRUCTIONS- 



PROFESS I ONHL ELECTRON I OS 
109 CHESNEY LANE COLUMBIA* B.C. 292^9 



ULR JFY 



A SOFTWARE 

ALTERNATIVE TO 

HARDWARE MONITORS 

A Machine Code Program 
designed to VERIFY that the 
program you thought you 
saved is reloadable without 
having to clear the memory by 
reloading EITHER embed 
VERIFY into important 
programs OR use as a 
programming aid 

DOCUMENTATION INCLUDES 

• Full instructions for 
implementation 

• Program listing $3.00 

• Cassette $5.00 

• 16k required 
Wl residents add sales tax 



£tfl 



SPACE BREAKER 
P.O. Box 8104 
Green Bay. Wl 
54308 



Figure 6. Timer/Controller. 



Address 


Decimal 




Mnemonic 


Comment 




16621 


58, 


68, 


64 


LD A, (NN) 


get countdown from 16452, 


16624 


61 






DEC A 


decrement countdown. 


16625 


32, 


11 




JH NZ, DIS 


(l) jump if not zero. 


16627 


58, 


69, 


64 


LD A, (NN) 


get timer constant. 


16630 


50, 


68, 


64 


LD (NN), A 


reset countdown. 


16633 


205 


, 25<*. 65 


CALL NN 


call line changer. 


I6636 


24, 


6 




JH DIS 


jump to second part of display routine. 


16638 


50, 


68, 


64 (1) LD 1 


load decremented value into countdown. 


16641 


205 


. 0, 





CALL NN 


call subroutine that was loaded from 
previous subroutine. 










Fi(!ure 1 ■ The Second P»rt of the [Mania* Routine 


Address 


Decimal 




Mnemonic 


Comment 


16644~| 












to k 


copy 4k 


rore from 406 to 426 




I6664J 












I6665 


205 


. 1?: 


. 1 


CALL NN 


call show. 


16668 


195 


. 152 


. 64 


JP NN 


jump to first part of display. 










Figure 9. Expander, Part A ( 1st quarter ) . 


Address 


Decimal 

33. 1, 1 




Mnemonic 

LD HL, NN 


Comment 

initialize ( 






16725 


rxaphlc list displacement & 


- 38 


16?28 


y>. 


43, 


64 


LD (NN), HL 


character construction displacement to 1 . 


cycle 


16731 


24, 


5 




JR DIS (l) 


jump over y. 


3 clock cycle timer. 


















Figure 10. Expander, Part B (Nth quarter). 


Address 


Decimal 




Mnemonic 


Comment 


16733 


6. 2 




LD 3, » 


load timer. 


• 38 


16735 


200 




(2) 


RET Z 


[-run timer. 


cycles 


16?36 


16, 

237 


253 

75, 




DJNZ DIS (2) 




I673P 








'O. 


64 


(1) 


LD 3C, (NN) 


get character construction dls. into C reg. 


16742 


6. 


) 




LD B, N 


set 3 reg. to 0. 


16744 


33. 


0, 




LD HL, NN 


load HL with code of character to expand. 


I6747 


41 






ADD HL, HL - ! 


— multiply times R . 


16748 


41 






ADD HL, HL 




16749 


41 






ADD HL, HL_J 




16750 


17, 


255, 


13 


LD DE, NN 


load DE with start of character const. list,35P3 


16753 
16754 


25 







ADD HL, DE 1— point to first byte in list. 
ADD HL, BC 1 


16755 


17. 


0, 




LD DE, RD 


clear- DE. 


1675? 


78 






LD C, (HL) 


load C reg. with first byte. 


16759 


35 






INC HL 


point to second byte. 


I676O 


70 






LD 3, (HL) 


load 3 reg. with second byte. 


16761 


62, 


128 




LD A, N 


load A to check bit 7. 


16763 


87 




(*> 


LD D, A 


save in D reg. 


16764 


161 






AND C 


check bit n of first byte. 


I6765 


40, 


6 




JR Z, DIS (3) if no graphic table dls. then jump to timer. 


16767 


62, 


1 




LD A, N 


load A with a displacement of 1 . 


16769 


131 






ADD A, 3 


total displacement. 


16770 


95 






LD E, A 


save total in E reg. 


16771 


24, 


6 




JE DIS (4) 


jump over timer. 


16773 


62, 


1 


(3) 


LD A, N 




16775 


61 






DEC A 


— ?2 cycle timer. 


I6776 









NOP 




16777 


32, 
122 


254 


W 


JR NZ, DTS 




16779 


LD A, D 


load A to check bit n. 


I67PO 


160 






AND 3 


check bit n of second byte. 


167 Q 1 


40, 


< 




JR Z, DIS (5 


) if no graphic table dls. then jump to timer. 


I6783 


62. 


2 




LD A, ' 


load A with a displacement of . 


167*5 


131 






ADD X, E 


total displace:- 


I67R6 


95 






LD E, A 


save total in 5 


l67 fi 7 


24, 
62. 


6 
1 


(5) 


JR DIS (6) 


jump over timer. 


167 P 9 


LD A, K 




16791 


61 






DEC A 


— 22 cycle timer. 


I6792 









NOP 




16793 


32, 
122 


254 


(6) 


JR "Z, DIS 




16795 


LD A, D 


load A for ckecklng bit n. 



54 



SYNC Magazine 



16?96 

16798 
16799 
16800 
16802 
16804 
16805 
16?06 
16808 
16810 
16811 
16812 
16814 
16815 
16816 
16818 
16820 
16821 
16822 
16P2U 
16826 
16827 
16828 
16830 
16831 
I6833 
16836 
16837 
16838 
I6839 
16842 
16845 

16849 
I6852 
16853 
16856 
16858 
16859 
16861 
I6863 
16866 
16867 
16868 
I6871 
16873 
I6875 
I6876 
I6879 
16881 
16884 
16886 
16889 
16P91 
16893 



254 



254 


72, 



(8) 



(9) 



(10) 



203. 15 

c ? 

161 

40, 6 

62, 4 

131 

95 

24, 6 

62, 1 

61 



32. 

122 

160 

40, 

62, 

131 

95 

24, 

62, 

61 



32, 

122 

22, 

33. 

25 
94 

87 

58, 44, 64 

50, 211, 65 

221, 33, 

44, 64 

221, 115, 

60 

50, 44, 64 

30, 

122 

203, 15 

48, 156 

5°, 43, 

60 

60 

50, 4?, 

254, 9 

40, 6 



33, 93, 

24, 5 



(?) 



load A to check tit n-1 . 

LC D, A save in L 

AND C check bit n-1 of first byte. 

JR Z, DIS (7) If no graphic table dls. then jump to timer. 

LD A, N load A with a displacement of 4. 

ADD A, E total displacement. 

LD E, A save total in E reg. 

JR DIS (8) jump over timer. 



N 



Dig 

D 



DIS 
N 



DIS 

D 

H 



■h 



64 



64 



65 



LD A, 

DEC A 

NOP 

JR 2, 

LD A, 

AND B 

JR Z, 

LD A, 

ADD A, E 

LD E, A 

JR DIS (10) 

LD A, N 

DEC A 

NOP 

JR 

LD A, 

LD D, 

LD HL, NN 

ADD HL, DE 

LD E, (HL) 

LD D, A 

LD A, (NN) 

LD (NN), A 

LD IX, NN [— 

LD (iX-W), E 

INC A 

LD (NN), A 

LD E, N 

LD A, D 

RRC A 

JR NC, DIS 

LD A, (!-) 

INC A 

INC A 

LD (NN), A 

CP N 

JR ", DIS (11) 

:xp 

LD HL, NN 
JR DIS (l -1 ) 



22 cycle timer. 



load A to check bit n-1. 
check bit n-1 of second byte. 
(9) If no graphic table J is. then jump to tirer. 
load A with a displacement of p . 
total displacement. 
save total in E reg. 
jump over timer. 



— 22 cycle timer. 



reg. 



(X) 



33, 85, 65 (H)LD HL, N- 
24, JR DIS (12) 

34, 2, 65 (12) ID (NN), HL 
6, 10C LI B, H 

16, 254 (13) DJNZ DIS (13) 
201 RET 



save D reg. in A 

set D reg. to 0. 

point to start of table. 

add displacement. 

load graphic code into E reg. 

restore D reg. 

get graphic list dis. 

put dls. into (iX+d). 

load IX reg. with start of graphic list -1. 

load graphic list with graphic code, 

increment displacement . 

save new displacement. 

set table displacement counter to 0. 

get bit checker. 

rotate for next bit. 

if all bits have not been checked then do again. 

get character construction displacement. 

increment dls, 

increment dls. 

save new dls. 

check if all bytes of character have been used. 

if yes jump to run expander again. 

use 4 clock cycles. 

load HL with part B of expnnder. 

jump to load caller. 

load HL with part A of expander. 

use 12 clock cycles. 

load caller. 

load time delay loop. 

run delay loop. 

return to caller. 



Address 


Decimal 


Mnemonic 


16°94 


221, 33, 60, 64 LD IX, NN 


16898 


42, 12, 64 


LD HL, (NN) 


16901 


17. 8, 


IJJ DE, NN 


16904 


25 


ADD HL, DE 


I6905 


62, 4 


LD A, N 


I6907 


P4 


(1) LD D, H 


16908 


93 


LD E, L 


I6909 


35 


INC HL 


16910 


1, 31, 


LD BC, NN 


I691 3 


237, 176 


LDIR 


I6915 


-'i, <% 


LD CNN), A 


1691 8 


221, 126, 


LD A, (iX-tti) 


16921 


18 


LD (DE), A 


16922 


58, 24, 66 


LD A, (NN) 


16925 


61 


DEC A 


16926 


40, 3 


JR Z, DIS (2) 


16928 


35 


INC HL 


16929 


24, 232 


JR DIS (1; 


16931 


33. 42, 66 


(2) LD HL, NN 


16934 


y*. 2. 65 


LD (NN), HL 


16937 


201 


RET 



Figure 11. Display Changer. 
Comment 



point to start of 32nd position list -1. 

point to start of display file. 

load displacement for display file. 

point to first character In 7th line. 

set A for 4 lines. 

load DE with HL for LDIR instruction's 

destination 

load HL for LDIR instruction's source. 

load BC for list of 31 . 

rotate line. 

load displacement in (iX-Hl). 

get graphic for 32nd position. 

load 32nd position. 

get back displacement/line count. 

decrement line count. 

if then all 4 lines have been rotated. 

point to first position of next line. 

go rotate next line. 

load HI, with start of 32nd position list 

routine. 

load controller to make new list. 

return to caller. 



Now Sinclair computer owners can 
have real personal security for 
communications , in formation, data, 
with the advanced capability of 

CYPHERS 



■Menu-driven, touch-controlled, 
encode/decode/change/ scramble/ 
unscramble/save message/saveall 

■Convenient operation requires 
no knowledge of programming, or 
previous experience with codes 
Have the security of unbreakable 
codes** with CYPHER9 from ROB ILL 
Send S39.9 5 check or money order 
to ROBILL PRODUCTS 555 Park Ave- 
nue ,Paterson ,NJ 07504 NJresadd5* 



■ tri.l taoedlna roeui r«. > 1." |iii> 'c( 
Men. of «.) ,«Mi protection e.event i 
... our edvartieaeent tor NX-r.C in din 



SERIOUS PROGRAMMERS 

"MUST-HAVE* UTILITIES 
For ZX-81 and T/S 1000 Computers 



READ/WRITE Cassette Data Files 



($10) 



Fast • Flexible • Error checking 
Work. In 2K RAM 



(SI 5) 



■ SAVE/MERGE/ERASE BASIC 

Powerful editing tool 

Merge BASIC programs 

Save BASIC program on data file 

Erase blocks of BASIC 

Use In 16-64K RAM 

(Includes read/write data files) 

Simple user Interface via USR function 
Well— documented uaer manuals 
Available on tape cassette In 
relocatable machine language 



SASE for Info 



Check or MO delivers now 



binusWare 

6 Turning Mill Road 
Lexington. MA 02173 



ZX-80 8K ROM USERS 

Completely expand your ZX-80 with 
8K Rom to a ZX-81 with full use of Fast 
and Slow. Smooth flicker free per- 
formance! 

Complete Kit: $32 50 & $2 50 postage & 
handling; PCB only $19 95 & $1 25 
p&h; Parts Kit Only $12 55 & $1 .25 p&h 

The Expandable ZX-80 and ZX-81 

A book of hardware projects that you 
can build yourself, from memory ex- 
pansion to speech synthesis Only 
$9.95 & $1 25 p&h 

Program writers: We publish software 
and complete books Write for details. 

COMPUTER ENGiNEEWNG SEMNHS 

The Jarrert Company 

P.O BOX 1722 

SHOW LOW. ARIZONA BS901 

(Dealers Inquiries Invited) 



November /December 1982 



55 



Address 

16671 
16674 
I6675 
16678 
16679 
16680 
16682 
16683 
16684 
16686 
16687 
16688 

I6690 
16691 
16693 
16696 

I6698 
16700 
16701 
I6702 
16703 
I6705 
I6707 
I6709 
16711 
16714 
16717 
16720 
16722 
16724 



Figure 8. 2 RKMark Reader. 



Decimal 
42, 66, 64 

126 

50, 105, 65 

35 

78 

62, 117 

60 

I85 



Mnemonic 

LD HL, (NN) 
LD A, (HL) 
LD (NN), A 
INC HL 
LD C, ( HL) 
LD A, 
INC A 
CP C 



N 



32. 12 






JR NZ, DIS (1) 


35 






INC HL 


78 






LD C, (HL) 


62, 1 






LD A, N 


185 






CP C 


32, 14 






JR NZ, DIS (2) 


^2, 70, 


64 




LD HL, (:K) 
JR DIS (3) 


24, 13 






62, 2 




(1) 


LD A, N 









NOP 







CO 


NOP 


61 






DEC A 


32, 252 






JR NZ, DTS (4) 


24, 4 






JR DIS (3) 


1. 2 




\ 2 \ 


LD B, N 


16, 254 




5 


DJNZ DIS (5) 


34. 66, 


64 


h) 


LD (NN), HL 


33. 85, 


65 




LD HL, NH 


34, 2, 


>5 




LD (NN), HL 


6, 192 






LD 3, N 


16, 254 




(6) 


DJNZ DIS (6) 


201 






RET 



Comment 

get adderss of character to ex 

load character Into A reg. 

load character into expander. (16745). 

point to next character. 

load character Into c reg. 

load a reg. with newline. 

check next character for newline. 

jump to timing loop if not zero. 

point to next character. 

load character into c reg. 

load a reg. with high order byte of next 

Basic instruction. 

check for end of message. 

jurcp to timing loop if not zero. 

get Sddress of first character in 2 REM. 

jump to re'sel ' REF reader. 



53 clock cycle timing loop. 



28 clock cycle timing loop. 

load address of next character to expand. 

load HL with start of expander. 

load controller with start of expander. 

load time delay loop. 

run delay loop. 

return to caller. 



Clock Cycles Rerin1r.fl Tfl 


2 REM 
er is 


read- 
reset 


newline on- 
ly found 


newline 
not fnd. 


7 
6 




7 
6 


12 


7 
7 




7 
7 




4 




4 




7 
20 




12 




12 












7 
13/8 


7 

4 

4/4 

4A 

12/7 

12 


70 




71 


70 



Totals for each branch have 
to be approximately the 
same. 



and adds the character construction 
displacement. It then gets the first and 
second byte that forms the character and 
checks bit 7 of the first byte for a 1 by 
ANDing the byte with 128d, or 
10000000b, and comparing the result 



with 128d. If there is a 1, a displacement 
counter for the graphics table is loaded 
with a displacement of one. Then the 
program ANDs the second byte with 
128d to check bit 7 for 1. If a 1 is found, 
a displacement of 2 is added to the table 



displacement counter. Then bit 6 of the 
first byte is checked by ANDing with 
64d or 1000000b and comparing the re- 
sult with 64d. If a 1 is found, 4 is added 
to the displacement counter. Then bit 6 
of the second byte is checked. If a 1 is 



M.C. LOTHLORIEN 



ZX81 




A FANTASTIC RANGE OF 16K WARGAMES FOR THE 
EACH COMPLETE WITH COMPREHENSIVE INSTRUCTIONS. 

SPECIAL CHRISTMAS OFFERS SAVE UP TO $20! 

Separate games $14 (each); Buy 3 for $35, or all 5 for a fantastic $50 

1. TYRANT OF ATHENS. 

Can you survive long enough to turn Athens into the most feared state in the Mediterranean? 
Train troops, build warships, fight battles by land and sea against hostile Greek States and the vast Persian Empire. Many 
more features in this very addictive game. 

2. ROMAN EMPIRE. 

Your aim is to conquer the hostile countries surrounding Rome. Build armies, appoint Generals and 
fight campaigns. This challenging game takes full account of morale, fighting efficiencies, leadership ability, etc. 3 levels of 
play. Playing time 2 hours - 2 days! 

3. PELOPONNESIAN WAR. 

Set in Ancient Greece from 431-404 BC, covering the Great War between Athens and 
Sparta. Your goal is a final victory over the Spartans but you will need all your skill in a combination of diplomacy and military 
force before you even stand a chance. 3 levels of play. 

4. SAMURAI WARRIOR. 

How could you have fared as a Samurai in the 1 3th Century Japan? Face challenges from other 
Samurai and bandits. Are you a survivor? Or will you be forced to commit ritual suicide? 7 levels of play. 

5. WARLORD. 

A challenging game of analytical skill. You are a warlord in 13th Century Japan. You have to defeat attacks 
by other warlords and pirates, capture slaves and clothe and feed your troops. A companion game to Samurai Warrior. 

ALL PRICES INCLUDE FULL POST AND PACKING. 

CHEQUES OR INTERNATIONAL MONEY ORDERS PLEASE, PAYABLE TO 

M.C. LOTHLORIEN, 4 Granby Road, Cheadle Hulm, Cheshire, SK8 6LS U.K. 



56 



SYNC Magazine 



1 



SOFTWARE 

DR. FLOYD 
Psychoanalysis by computer? - well, not 
quite but Dr. Floyd will carry on a conver- 
sation with you using psychoanalytic tech- 
niques giving the appearance of artificial 
intelligence. Requires 16K RAM. $10.95 



ZX81 ■ TS1000 



GRAPHICS PAC I 
An introduction to Sinclair graphics- 
includes: 2 random picture drawers, allow 
creation of "Pop" art. A screen formatter 
which allows placing any character 
anywhere on the screen. Complex pic- 
tures may be created & saved. Doodler 
allows line art drawings to be created & 
saved. Requires 16K. $10.95 



WORD PLAY 
Includes: "Jargon" - a jargon word 
generator. "Animal" - a fun game where 
the player teaches the computer all about 
animals. "Story" - the computer writes 
stories using the players input names, 
places, etc. Can be very funny for kids. 
"Haiku" - the computer composes HAIKU 
like poetry. Requires 16K. $10.95 

SNAKES ALIVE 
A group of arcade type snake games. You 
must evade, box in, capture or destroy. 
Fast moving and a lot of fun. Requires 
16K. $12.95 

All software is on high quality cassettes 
and is replacement guaranteed. 




J 45 



95 



HARDWARE 

SIN16 
16K RAM 



This RAM plug-in allows the user to run 
virtually all programs written for the ZX81 
or TS1000. Completely assembled & 
tested. The reliable one. 



s 135 



95 



SUPER SIN64 
64K RAM 



TO ORDER: 

Send Check or Money Order 

For the total plus: 

$3.00 shipping (Software) 

or $4.00 shipping (Hardware) 

Calif, residents add 6% tax. 

Phone orders: CALL 

805/482-3604 



This is the maximum directly address- 
able RAM that your ZX81 or TS1000 can 
use - Memory is used as follows: 0-8K 
Sinclair operating ROM. 8-16K switches in 
or out of use. Used for assembly 
language routines, memory mapped 
peripherals. Contents are safe from NEW 
and cassette (disc) loads thus allowing 
program-to-program communications. 
16-32K BASIC and assembly language 
user program area. 32-64K large data 
arrays & BASIC variables. 



All hardware is completely compatable 
with Sinclair add-on products. Both 
RAMS use the most reliable gold plated, 
bifurcated contact connector on the 
market. 



For credit card orders, include a 
information on card. 



-RPROPOS T€CHNOLOGU. 



10 day return privilege on all hardware-90 
day parts and labor warranty-inexpensive 
extended service contract is available- 
WE SERVICE WHAT WE SELL. 
350 N. Lantana Ave., Suite 821 • Camarillo, CA 93010 



Fpfiemern 

r Y 

PLANET FINDER FOR THE 16KTS-1000/ZX-81 

MERCURY, VENUS, MARS, JUPITER and 
SATURN are all visible to the naked eye. The ancients 
recognized that their special quality is that they move against 
the background of "fixed" stars. Predicting their movements 
has been the preoccupation of geniuses for thousands of 
years Now these movements are well understood, buy only by 
a few dedicated observers Ephemens V is designed for these 
people and others (ages 12 and up) who wish to join them in 
this pursuit of basic knowledge. 16K reqd 
ENTER: date, time, lat. and long. (Lat. and long, can be 
perm.) Then choose a planet. In seconds Ephemeris V 
responds with: 

1. Azimuth and Altitude 

2. Right Ascension and Declination (for astronomers) 

3. Simple compass coordinates (for beginners) 

4. GRAPHIC DISPLAY of planet in current 
constellation 

5. LOCAL sidereal (star) time to aid in finding stars, 
comets, nebulas, etc. 

Own or give this incredible program and reap the harvest of real 
understanding forever! Comes on quality cassette with docu- 
mentation. Send a money order or check for S8 00 ppd to 
EPHEMERIS V, P.O. BOX 26 1 . Winchester, KY 40391 



GENERAL SYSTEMS CONSULTING 

2312 Rolling Rock Drive 

Conley, Georgia 30027 
SINCLAIR ZX81 and 
TIMEX SINCLAIR 1000 SOFTWARE 

16K minimum configuration 
Designed to help monitor your finances. 

1 Amortizations 9 95 

2 Bar Charts 9 95 

3 Annuity Evaluation 9 95 

4 File Manager 9 95 

5 Bank Statement Balancer 9 95 

6 Checkbook Simulator 9 95 

7 Depreciation Straight Line 9.95 

8. Depreciation Declining Balance 9 95 

9 Depreciation (ACRS) 9 95 



Diet Plan 9 95 

Home Budget 9 95 

Home Inventory 9 95 

Home Payables 9.95 

Home Equity Evaluation 9.95 

Real Estate Investing 9.95 

Savings/Investments Analysis 9 95 

IRS 1040 (Long Form) 9 95 

IRS 1040A (Short Form) 9 95 

Income Tax Projections 9 95 



10 



Circle selections and fill out form below: 
12 3 4 5 6 7 8 
11 12 13 14 15 16 17 18 19 

Number of items selected @ 9.95 

Postage/Handling 1 50 

Total: 

NAME 

ADDRESS __ 

CITY, STATE, ZIP 



MUSICIANS! 

Music theory & ear training program cassettes for 
TIMEXSINCLAIR Computers (minimum 2K RAM). 
$5.95 for sample or send SASE tor catalog of programs. 

EVANSOFT - Dept M 

1 246 Elmwood Avenue 

Evanston, IL 60202 



*" for TIMEX/SINCLAIR computers *** 

LOST IN SPACE (uses SLOW) 1 1.95 

UNIVERSAL INVENTORY FILE 16.95 

UNIVERSAL MAILING UST 10.95 

UNIVERSAL COIN COLLECTION. 10.95 

UNIVERSAL STAMP COLLECTION 10.95 

UNIVERSAL COMIC BOOK COLLECT 10 95 

UNIVERSAL BASEBALL CARD COLL 10.95 

UNIVERSAL RECORD ALBUM COLL 10.95 

Each program on cassette + manual (8K 
ROM, 16K RAM). Please add $1.50 for ship- 
ping and handling. N.J. residents add 5% lax. 
M.C. HOFFMAN CO. 
P.O. BOX 117, OAKLAND, N.J. 07436 



HOME CLOCK FAMILY BULLETINS 
TIMEX SINCLAIR 1000/SINCLAIRZX81 16K 

Continuously running clock calendar and family 
bulletins. User friendly allowing selection of over 
12 functions. Menu driven, large clock digits, set 
date/time/alarm, update bulletins, fully doc. Send 
$20 for program or SASE for brochure to: 
KING SOFTWARE 
85 Myrtle St., Lowell, MA 01850 



COMPUTER / VIDEO GAME 

REPAIR 

AID ELECTRONICS 

971 1 S. Petersham Dr. 

Houston, Tx. 77031 



1 6-32-48K expands RAM 

$45-65-85 tits inside 

(outside add $8) list with a SASE 

Dancer 

9850 Metro Parkway West, suite 100 

Phoenix AZ 85021 







For ZXSI »TSIO00 I6K KM 










• e 
e e 






V 

• • 




ch«lli*nfEin£ and rxciting 

Oihcr \r» Coboi Available 


e 




• •no SASE lor F BE E info: 


> 




n 


I* 

K 


PHOT 01. AB -^ 
P.O. So. 2III4 NJ? 
mnody SpocoContor, FL. 32815 





Need a good game to play or pro- 
gram? Circle Chess board with in- 
structions $5.00. Send your record- 
ed Circle Chess games and pro- 
grams for publication in Circle 
Chess Journal, Box 63, Des 
Plaines, IL60017. 



Address 


Decimal 




Mnemonic 


16938 


17, 64, 64 




LD DE, NIC 


16941 


221. 33, 45, 


64 


LB IX, NN 


16945 


58, 65, 64 




LD A, (NN) 


1 69**8 


6, 4 




LD B, N 


16950 


79 


(1) 


LD C, A 


16951 


50, 60, 66 




LD (NN), A 


16954 


221, 126, 




LD A, (IX+d) 


16957 


18 




LD (BE), A 


I6958 


27 




DEC DE 


16959 


121 




LD A, C 


I696O 


198, 4 




ABB A, :,' 


16962 


16, 242 




BJNZ BIS (1) 


16964 


58, 65, 64 




LB A, (N-.) 


16967 


254, 3 




CP N 


I6969 


40, 10 




JR Z, DIS (2) 


16971 







NOP 


16972 


60 




INC A 


16973 


50, 65, 64 




LD (NN), A 


16976 


33. 85, 65 




LD HL, NN 


16979 


24, 9 




JR DIS (3) 


16981 


175 


(2) 


X0R A 


16982 


50, 65, 64 




LD (NN). A 


I6985 


33, 31. 65 




LD HL, NN 


16988 


24, 




JR DIS (3) 


16990 


34, 2, 65 


(3) 


LD (NN), HL 


16993 


6, 190 




LD 3, N 


16995 


16, 254 


(4) 


DJNZ DIS (4) 


16997 


201 




RET 



Figure 12. 32nd List Routine. 
Comment 



point to bottom of 32nd position list. 

point to top of graphic list. 

get displacement for 3?nd position list. 

set B reg. for 4 graph <cs. 

save displacement in C reg. 

load displacement in (iX+d). 

get graphic from graphic list. 

load in 32nd position list. 

point to next position. 

put displacement into A reg. 

add 4 
go do next graphic. 

get displacement for 32nd position list, 
check if 16 graphics have been used, 
if yes then Initialize, 
use 4 clock cycles, 
increment displacement, 
store displacement. 

load HL with start of part A of expander, 
jump to load controller, 
load A reg. to initialize displacement, 
store displacement, 
load HL with start of 2 REK reader, 
use 12 clock cycles, 
load controller, 
load time delay 
run time delay, 
return to caller. 



found, 8 is added to the table displace- 
ment counter. If 1 is in all four bits, the 
table displacement counter contains 1 + 
2 + 4 + 8 = 15. The table starts at 
16456 so 16456 + 15 = 16471 (see Fig- 
ure 2). This address contains 128d or the 
CODE for inverse space. This graphic 
represents the four bits in the first two 
bytes of the character being expanded. 
The expander loops until all the bits are 
checked and four graphics are listed. 
The remaining bytes are decoded during 
the next three times the expander is run. 

Now it is time to get ready to display 
again. The character construction 
displacement and graphic list displace- 
ment are saved and the controller is set 
so the routine will not initialize until af- 
ter the expander computes the graphics 
for the six remaining bytes. 

This expander routine contains timing 
loops as in the 2 REMark reader. There 
is one that is just as long as the initializa- 
tion so that the last three runs are times 
as long as the first run. There are loops 
so that finding a takes just as long as 
finding a 1. If these loops were not in- 
cluded, each character being expanded 
would take a different amount of time to 
decode. Finally, there is a loop at the 
end to keep this routine synchronized 
with the other routines. 

The Display Changer 

All the other routines are prelimi- 
naries that take place during several 
vertical blanking periods. The display 
for the Horizontal Scrolling program 
has to be changed during one vertical 
blanking period to get a complete 
display. 



58 



The display changer rotates the 
character in line 7 one space to the left 
with the Z80 LDIR instruction. The 
first character before rotation is elimi- 
nated. After rotation, the 32 position is 
filled with a graphic character from the 
"32nd Position List" which starts at 
16445 (see Figure 12). The routine loops 
until the next three lines are rotated and 
their 32nd positions filled with their 
graphics. Next the controller is set to the 
routine that computes a new list of 
graphics for the 32nd positions. 

There are no timing loops because this 
subroutine takes a longer time to run 
than any other subroutine. The display 
changer takes just as long to run each 
time it is run. 

The 32nd Position List Routine 

This part of the program (see Figure 
12) was written to make the display 
changer run more efficiently since it 
takes the longest time to run. The graph- 
ics in the 16 graphic expander list are 
not in order to fill the 32nd line po- 
sitions so another list of four graphics is 
made. 

After a new character from 2 REM is 
expanded, the 1st, 5th, 9th, and 13th 
graphics are listed in the 32nd position 
list.' A displacement for the expander list 
is incremented and stored in memory 
16449 (see Figure 2). The controller is 
set for the expander and after another 
timing loop, the program goes back to 
finish the display cycle. The program 
will cycle through the expander and dis- 
play until the timer runs to zero and the 
display changer uses the graphics in the 
32nd position list. The controller is then 

SYNC Magazine 



set for the 32nd position list routine. 

After displaying again, the controller 
runs this subroutine again. The displace- 
ment is taken from 16449 so that the 
2nd, 6th, 10th, 14th graphics are listed. 
The cycle repeats until all 16 graphics 
are used. Then the displacement is reset 
and the controller is set to run the 2 
REM reader to get a new character. 

Loading the Program 

Since the loading for this program was 
designed for IK RAM, the procedure 
was broken up into several parts. This 
makes loading somewhat difficult. So 
following the directions carefully is 
essential. 

Constructing the 1 REM Statement 
Make a 1 REMark statement that is 
exactly 6 lines long as shown. 



1 REM 



Duplicate the 1 REM statement to 
make the 2 REM statement by pressing 
EDIT, RUBOUT, 2 and NEWLINE. 
Two REM statements now appear on 
the screen. Add a third REM statement 
in the same way by pressing EDIT, 
RUBOUT, 3, and NEWLINE. Now 
only the 3 REM statement is on the 
screen. 

We will now combine these three 
statements into one REM statement by- 
removing the end-of-line character 118 
at the end of each of the first two REM 
statements. Enter these instructions in 
the immediate mode (i.e., without line 
numbers): 

POKE 16619,0 

POKE 16815,0 
The one long REM statement which re- 
sults is scrolled off the screen so the 
screen is now blank. 

Entering the Loader Program 
Next, enter the loader program in Fig- 
ure 1. 

Figure 1. Loader Program. 



2 FOR 1=16453 TO 16537 
INPUT A 

4 IF PEEK (16421) -20 AND PEEK < 
16420) =1 THEN CLS 

5 PRINT CHR*( (A< 10)+1) ; CHR* ( ( 
A<100>+1> ;A; "#"; 

6 POKE I, A 

7 LET B=B+A 

8 NEXT I 

This program must be kept short be- 
cause the 1 REM statement is so long 
and bytes have to be saved for displaying 
the data we are about to enter. 



The B variable is used as a checksum. 
We must initialize B before using the 
loader program. Enter the following 
instruction in the immediate mode: 

LETB = 
In order to save B do not use RUN. In- 
stead, enter in the immediate mode this 
instruction: 

GO TO 2 

Entering the Machine Code 

We are now ready to enter the pro- 
gram that we have been developing since 
Figure 2. Enter the following numbers as 
they will appear on the screen four lines 
at a time to make checking easier. (The 
list starts at 16453 in Figure 2.) 

10 119 66 4 6 2 5 

131 8 135 7 136 3 133 130 

134 132 128 42 70 64 34 66 

64 33 31 65 34 2 65 175 

33 61 64 6 5 119 35 16 

252 1 117 7 12 42 12 64 

35 1 1 3 16 252 6 4 197 6 

32 35 54 128 16 251 35 193 

113 16 243 6 14 35 113 16 
252 34 14 64 34 16 64 175 
50 37 64 6 1 

Change line 2 of Figure 1 to: 
2 FOR 1=16621 TO 16643 
Enter the following immediate 
instruction: 

GO TO 2 
and type in the following numbers: 

58 68 64 61 32 11 58 69 
64 50 68 64 205 254 65 24 
6 50 68 64 205 O 

Change line 2 of the Figure 1 to: 

2 FOR 1=16665 to 16997 
Enter the immediate instruction: 

GO TO 2 
and type in the following numbers: 

205 173 1 195 152 64 42 66 

64 126 50 105 65 35 78 62 

117 60 185 32 12 35 78 62 

1 185 32 14 42 70 64 24 



13 62 2 

24 4 1 2 

64 33 85 65 

192 16 254 201 



61 



32 



16 254 34 66 

34 2 65 6 
33 1 1 34 



43 64 24 5 6 2 200 16 

253 237 75 43 64 6 33 

O 41 41 41 17 255 13 

25 17 9 78 35 70 



62 128 87 161 40 

131 95 24 6 62 

32 254 122 160 40 

131 95 24 6 62 



6 62 1 

1 61 

6 62 2 

1 61 



32 254 122 203 15 87 161 40 
6 62 4 131 95 24 6 62 
1 61 32 254 122 160 40 
6 62 8 131 95 24 6 62 

1 61 O 32 254 122 22 

33 72 64 25 94 87 58 44 
64 50 211 65 221 33 44 64 

221 115 60 50 44 64 30 



O 122 203 15 48 156 58 43 

64 60 60 50 43 64 254 9 

40 6 33 93 65 24 5 

33 85 65 24 34 2 65 

6 100 16 254 201 221 33 60 

64 42 12 64 17 8 25 

62 4 84 93 35 1 31 

237 176 50 24 66 221 126 O 

18 58 24 66 61 40 3 35 

24 232 33 42 66 34 2 65 

201 17 64 64 221 33 45 64 

58 65 64 6 4 79 50 60 

66 221 126 18 27 121 198 

4 16 242 58 65 64 254 3 

40 10 60 50 65 64 33 

85 65 24 9 175 50 65 64 

33 31 65 24 34 2 65 

6 190 16 254 201 



Using the Checksum Routine 
Enter the immediate instruction: 
PRINT B 

and 29321 should appear on the screen. 

If it does not, you will have to go back 

and reenter the numbers. 

Processing the Machine Code 

Erase lines 2-7 by typing in each line 
number and NEWLINE. 

Enter the following program: 

2 FOR 1=16538 TO 16620 

3 POKE I, PEEK (1-16217) 
8 NEXT I 

RUN this program (you may now use 
RUN). 

Change the above program so that 
will read: 

2 FOR 1=16644 TO 16664 

3 POKE I, PEEK (1-16238) 
8 NEXT I 

RUN this program. 

Entering Your Message 

Prepare a 1 REM statement with the 
message you want to rotate and enter it 
with the following program. For 
example, 

2 REM "SYNC" THE 
MAGAZINE 
FOR SINCLAIR USERS. 

500 LET K = USR (16472) 

Be sure to use 500 for the USR line 
because the program uses it for a flag to 
signal the end of the message. RUN the 
program and your message will contin- 
ually scroll across the screen. To exit the 
program, press BREAK. 

Interesting variations can be made in 
the program by POKEing different 
numbers into the appropriate addresses. 
For example, the speed of the scrolling 
can be changed by POKEing a number 
between 7 and 255 in address 16453. The 
display can be given variety by chang- 
ing the codes in the graphics table to 
their inverse codes. 5 



November/December 1982 



59 



Get serious about ZX81 
& ¥5 WOO Computing 



[ Cass ette Software 

Simplicity of BASIC with the 
Speed of Machine Code 

1 A complete implementation of the FORTH language tor 
the ZX81 and TS1000 computer. 

FORTHs most distinctive feature is its flexibility. The 
basic unit is the word — the programmer uses existing 
words to define his own which can then be used in fur- 
ther definitions. FORTH is a compiled language so pro- 
grams run very fast (typically five times faster than 
BASIC). 
ZX-FORTH is supplied on cassette and is accompanied 

| by extensive documentation: 
56-page Users Manual 
8-page Editor Manual 

I Artie $29.95 



ZXBUD 



Machine Code Monitor and Disassembler 

ZXBUG is a powerful tool for machine language pro- 
gramming. It is 4K long and uses memory from 71EO to 
the top memory. ZX BUG works in hexa- 
I decimal (base 16), not decimal, so all addresses are a 
I maximum of 4 Hex bits long. Provides a total of 28 com- 
I mands. 
Artie $14.95 

zx 

{ASSEMBLER 

I This Machine Code program occupies 7K of memory 
I and locates itself at the top of memory. The program is a 
I full Editor/Assembler and Monitor. Labels may be used 
instead of any string. The features include Line Inser- 
tion/Delete, Insert Characters. Auto Repeat on all keys. 
The monitor has facilities to inspect memory, registers 
and run machine code programs. 
Artie $14.95 

TOOLKIT 

9 Powerful New Functions! 

RENUMBER. This routine renumbers a program in any 
step and from any line up to 9999 
DELETE. This command deletes a group of lines in a pro- 
gram, 

MEMORY Prints how much spare memory is available. 
DUMP. Displays current values of string and numerical 
values, except arrays. 
FIND. Will find any string of up to 255 characters and list 

I each line containing that string. 
REPLACE. Replaces any string of up to 255 characters 
by any other string. 

SAVE. Transfers program in computer to below RAM- 
TOP 

APPEND. Allows two programs to be Joined. 
REMKILL. Removes all REM statements from a program, 
otherwise leaving it unchanged, preserving memory. 

I Artie $14.95 



DATA STORAGE SYSTEM 



MULTIFILE PLUS 



For 16K or greater ZX81 



PRICE INCLUDES: 

1 PROGRAM TAPE 

2. 8-PAGE BOOKLET 

3. THREE DATA STORAGE 
TAPES 

4. STORAGE CASE 



$34.95 



v~ ... - - "^ 


■ Hum* ^'ii^fc 


[ ! §11 




L— - 




Data Storage System 

An amazingly versatile multi-purpose filing system for 
the 16KZX81. The program is menu-driven, and number, 
size and headings of files are user-definable. Both string 
and numerical files are catered for. Files may be 
created, modified, replaced, and searched, and are pro- 
tected by an ingenious foolproof security system. Out- 
put to the ZX printer is also provided. The program 
comes on cassette, together with three quality data 
cassettes for file storage, and comprehensive documen- 
tation, describing a host of applications for both 
business and personal use. Supplied in an attractive 
storage case. If your ZX81 is bored with playing games, 
then this program will give it plenty to think about! 



The Complete ZX81 
and TS1000 Library! 


BOOKS 


The Complete ZX81 Basic Course 

Basic Course Cassettes (2) 

Getting Acquainted with your ZX81 

ZX81 Pocket Book 


$34.95 
7 50 
8.95 

.10 95 


Making the Most of Your ZX81 


10 95 


Computer for Kids, ZX81 Edition 

Explorers Guide to the ZX81 


3 95 
. . 10.95 




8 95 


49 Exploding Games for the ZX81 


. 10 95 


Not Only 30 Programs for ZX81 : 1K . . . 


. . 14.95 


Machine Language Made Simple for Sinclair . 

Mastering Machine Code on your ZX81 

ZX81 Rom Disassembly: Part A 


. 19.95 

12.95 

. .14 95 


ZX81 Rom Disassembly: Part B . . 


14 95 


Understanding your ZX81 ROM 


...19.95 



with Quality Hardware and Software 
from Gladstone Electronics 






ZX81 Professional Keyboard 
and Case 

A full-sized professional keyboard for the ZX81 Features 
47 keys and a full-sized space bar. Connects to the ZX81 
with no soldering required, via a plug-in flexible connec- 
tor. You can purchase the keyboard only, or the optional 
metal case that holds both keyboard and ZX81. Expan- 
sion devices (i.e. RAM packs, etc) connect to the ZX81 
edge-connector which extends from the rear of the 
cabinet. 

A professional keyboard makes program entry easier 
and less error-prone. 

Keyboard (KB-1) $85.00 

Metal case for keyboard 

and ZX81 (MC-1) $25.00 



32K RAM 



$89.95 




with "piggyback" feature 



A sensible choice for 16K RAM owners. Jigsaw 32K RAM 
piggybacks' onto your 16K RAM to give a total memory 
of 48K! If you do not own a 16K RAM. you may use a 32K 
RAM instead. At a later date you may add the ZX81, 
TS1000, or Jigsaw 16K RAM, should you decide you re- 
quire more memory. 

A very useful, unique Jigsaw memory feature is the pilot 
light showing if your ZX81 computer/memory is 
powered. 

Larger memory enables longer programs and greater 
data bases, enhancing the value of your personal com- 
puter. And the Jigsaw 32K is part of a fully compatible 
ZX81 and TS1000 system of add-on products. Additional 
exciting Jigsaw products to follow shortly 1 



B4KRAM 



$149.95 



Expands the ZX81's memory capacity to its maximum. 
Use instead of 16K RAM. Same features as other Jigsaw 
memory products including pilot light and full com- 
patibility with other upcoming Jigsaw products 



CALL OR WRITE FOR FREE CATALOG 



16KRAM 



Equivalent to ZX81 or TS1000 16K RAM. Fully compati- 
ble in appearance and performance with other Jigsaw 
products. 



$49.95 



GLaDSTOnE- -ELEGTROniCS ^^ 

Mail order to 1585 Kenmore Ave. Buffalo N.Y. 14217 Checks or money orders. No CODs. Add^Mpping 



Call (716) 874-5510 
For Visa, MC Orders 



Have tun withZXBl 
& T5 WOO Computing 



Now Choose 

from 3 great 

games! 




Introducing 



The Ultimate 
Adventure 

With a 10,000 pounds sterling 

(real money!) 

pay-off 

'MY SON.by the time you receive this package, I will be 
dead This is my legacy to you All my life I have worked 
hard to make a living and save money for your future. As 
you know I was an international courier. Contained on 
this cassette are 12 clues of an international flavor, 
which will furnish you with the information to gain ac- 
cess to a bank account. In that bank account is a 
minimum sum of 10,000 pounds sterling, which I have 
accumulated on your behalf over the years. The longer 
the sum remains in the account the greater the amount 
will become. I could have bequeathed the money to you, 
but I feel it is in your interest to solve these dues. Then I 
will feel you are mature enough an adult to handle this 
legacy. 

God bless you always, your loving father . 
So begins KRAKIT, the ultimate adventure and treasure 
hunt on the ZX81 . The bank account and the prize actual- 
ly exist. Crack the puzzle and the prize is yours! Krakit 
consists of 12 clues. In each clue there is a reference to 
a country, a city or town and a number. When you have 
solved the first clue, you will need to enter the two 
words and the number to release the next clue. It is 
necessary to solve all the clues to find the correct 
answer. If you do you will be supplied with two airplane 
tickets. When you arrive, a check for a minimum amount 
of 10,000 pounds sterling will be presented to you. Fur- 
thermore for every copy of Krakit sold a further dollar 
will be placed in the bank account. 

Here is the type of clue you will find in Krakit: 
'Where it all began Where the torch was first lit. Where 
muscles and sinews strain Where our heros won ac- 
claim. 

Where the symbols hold the key. ' 

KRAKIT.16K RAM $19.95 

RULES. 1 . The first person to be confirmed by the judges, 
to have completed all the clues correctly will be the win- 
ner. 2. There will be one winner only. 3. No person 
related to I.P.S. is eligible. 4. Offer not valid where pro- 
hibited by law. 
'Trademark of international Publishing & Software, Inc. 

MAZDBS 



MAZE 
ADVENTURE 

$9.95 



A new standard in 2X81 programming. MAZOGS 
presents the best use of ZX81 graphics to date Written 
in machine code, MAZOGS is fast, exciting, and 
challenging! 

You are confronted by a large complex maze which con- 
tains a fabulous Treasure. Within the maze are the 
Mazogs who will involve you in combat when you meet 
them. Each game begins when you meet them. Each 
game begins with a different randomly created maze. 
You will not see all of the maze. As you move through 
the halls, you will be startled by the quality of the 
graphics animation and the speed with which the game 
progresses. 

Once you have mastered the first two levels of the game, 
you are ready to challenge the Maniac Mobile Mazogs 
who move about in a totally unpredictable manner. 
To those who say the ZX81 is not a good games-player: 
we suggest you try your luck with Mazogs! (16K or 
greater) 



ZX CHESS 



GALAXY 
INVADERS 

$14.95 




An excellent version of the classic space game. Protect 
your seven lives against fleets of hostile invaders, who 
swoop down and attack quickly. This version is an ex- 
cellent demonstration of the capabilities of the ZX81 or 
TS1000 to entertain and excite for hours. 



ZX 
SCRAMBLE 

$14.95 




Pilot your space craft through a fast moving, complex 
space maze. Watch out for missiles being fired from all 
directions. You can shoot back or evade them. Written in 
machine code for fast-paced excitement. 



MARINE 
RESCUE 

$11.95 




7=!1 



-Jt: 



b 



Your ZX81 becomes the command console as a diver 
descends to the sunken submarine Nautilus to rescue 
as many of the stranded crew as possible. It's a race 
against time as your oxygen supply must be replenish- 
ed. It's also a constant battle against marauding sharks 
which you can attempt to blast with your laser 



(Enhanced)] 



Full graphic display of chess board. Six levels of play, 
two of which play within competitive time limits. You 
choose black or white. Plays all legal moves including | 
castling and en-passant. You can save games in pro- 
gress on cassette. Displays moves of game on screen, I 
or output yo printer, for analysis. Board can be set up in 
any position, you can even change sides mid-game. 
Clear entire board with one command: for end game I 
analysis. Written totally in machine code, ZX CHESS 
(Enhanced) is a superb game for the advanced chess 
player. 
16K $12.95 | 

ZX CHESS II (CHESS MASTER) 

The strongest chess game available on ZX81 . ZXCHESS 
II has not ben beaten. All the features of ZX CHESS 
(Enhanced), plus much more. Has a book of 32 opening 
moves. Can play at 7 levels, four of which play within 
competition time limits. A move is suggested by the 
ZX81 it requested. 
16K. $24.95 

1KZX CHESS 

A good introduction to chess for 1K ZX81/TS1000 
owners. Even within this limited memory space, a full 
graphic representation of the chess board is included. 
Single level of play. Does not accept castling or en- 
passant moves. $12.95 



BLACKJACK 



$14.95 




Blackjack at its best. Blackjack as it played in the 
casinos of Nevada. Up to five players can play against a 
dealer with a fifty-two card deck. Split pairs, double 
down, and even buy insurance. The deck is reshuffled 
only when needed — allows for a continuous game. 
Your winnings and losings are displayed after each 
hand. 

Adventure Games! 

Galactic Commando 11.95 

Crown & Scepter 1 1 .95 

Tank Trap 11-95 

Slot Machine 14.95 




n you can auempi iu uias>i wun yuui i«bi. 

GLaDSTOn^ -ELECTROniCS 



Call (716) 874-5510 for Visa, MC Orders 



CHARGE TO: 
|D VISA □ MASTERCARD 

i account number 



Please rush me: 



- . ^.^_ 



Signature 



1 



I 

| Date 



Quantity 



Price Total 



I NAME 

| ADDRESS. 
| CITY: 



New York I I _ 

-Res add sales I I | 

tax 



.STATE: 



.ZIP:, 



SHIPPING 

TOTAL. 



To: Gladstone Electronics, 1585 Kenmore Ave., Buffalo N.Y. 14217 
Call or write for free TS1000 & ZX81 catalog 



I 
I 
J 



8KROM 

16K RAMI IK RAM) 



Line Print Utility 



Martin Albrecht 



Reading computer-style text, where the 
words get chopped off at the end of the 
line, is easy enough once you get the 
hang of it. However, if the printout of a 
program is intended for use by people not 
used to this style, it is friendlier to PRINT 
out the text in a more legible format. 

Listing 1 is a simple subroutine for the 
Timex/Sinclair computers that will 
PRINT a string text in such a way that 
the left margin is straight and each line 
ends with a whole word. 

This rudimentary word-processing util- 
ity uses a pair of nested FOR-NEXT loops 
and exploits the unique string-slicing capa- 
bilities of the Timex/Sinclair. 

Here is how it works. After the string 
text is registered, line 20 sends the com- 
puter to the 32nd element in the string. 
Since the Timex/Sinclair video format 
prints 32 columns across the screen, the 
32nd element of the string will be at the 
right-hand margin of the first line of raw 
text. At this point (R), lines 30 and 40 
start the computer counting backward (R 
minus K), inspecting the code of each 
successive string character. If code (the 
space) is found, the machine jumps out of 
the K loop to line 60. Here it is command- 
ed to PRINT the slice of A$ that starts 
with the 31st element counting backward 
from R (here, the first string element, 
since 32-31=1) and ends with the first 
space character it met on its backward 
search from R. This gives the first process- 
ed line of text. 

The trick now is to make the machine 
print out the second and subsequent lines 
by the same rules. 

Simply incrementing R by 32, thus send- 
ing the machine to the 64th string ele- 
ment will not do, except in the unusual 
case that the 32nd element happened to 
be a space. In the more common case, 
the machine has to "dump" one or more 
string elements in its backward count 

Martin Albrecht. 1143 McKinley Ave.. #17. 
Oakland. CA 94610. 



62 



from element 32 until it encounters the 
first space. These "dumped" letters, of 
course, make up the first part of a 
chopped word, and they must be recov- 
ered to begin the second line of processed 
text. If we send the computer to string 
element 64 to begin its space search, we 
will have gone past the right-hand margin 
of the second line of text and be some- 
where in the third line. Consequently, the 
letters dropped from the first line will be 
lost. Our starting point for searching the 
second line has to be not 64 (the 64th 
string element) but rather, 64 minus the 
number of dropped letters. This number 
is given by the value of the counter, K. 
Therefore, we decrement the value of R 
by K (line 70 of the program) and only 
then do we increment R by STEP 32 and 
start the cycle anew. 

Listing I. Line Print Utility. 

18 LET «*=" (YOUR TEXT TO BE P 

ROCESSEO) " 

SO FOR R-3a TO LEN R« STEP 32 

30 FOR K»0 TO 32 

4.0 IF R* (R-K) >CHR$ THEN GOTO 
60 

50 NEXT K 

60 PRINT RJMR-31) TO (R-K>> 

70 LET R=R-K 

80 IF (R+32) >LEN R* THEN GOTO 
100 

90 NEXT R 

100 PRINT R*(<R+1) TO ) 

Everything proceeds smoothly now 
until the program gets to the last line of 
the raw text. If, as is usually the case, this 
remainder has fewer than 32 elements, 
then the next STEP value of R would 
exceed its limit of LEN A$. The program 
therefore balks. It might be though that 
this could be fixed by raising the limit of 
R, say to the value LEN A$ + 32, but this 
does not work. Any element of AS with a 
subscript higher than LEN AS will not be 
found when the computer gets tp the 
PRINT command, and again we get error 
report 3— subscript out of range. The 
solution is line 80, which inspects the 
value of R to see whether the next incre- 
mental step would exceed LEN AS. If so, 
the machine is directed to line 100 with 



its command to print everything from R 
+ 1 (the last space plus one) forward to 
the end of the string. 

The ZX81 handles this slightly complex 
operation, in which the slicing subscripts 
are themselves expressions, with remark- 
able dispatch. It spits out the processed 
text at a rate of better than five lines to 
the second, in SLOW mode. It could be 
made to go marginally faster by limiting 
the value of K to, say, half the line (16) or 
even less, since there are few words of 
this length. But this does not seem neces- 
sary. If the string text contains a word of 
more than 31 letters, however, the pro- 
gram in its present form breaks down. If 
this is liable to be a problem, you can 
always add line 

45 IF K=31 THEN PRINT AS 
In other words, if the word is too long 
forget it! 

This routine prints the text flush left, 
ragged right. There is a clean left margin 
without the leading spaces that occur in 
the raw text. If instead you want to print 
it flush right, ragged left, then enter the 
following lines in Listing 1 : 

60 PRINT TAB K; A$((R-31) TO (R- 
K)) 

100 PRINT TAB (LEN AS+l-R): 
((R+l)TO#) 

It should not be too complicated to 
add further modifications that run cen- 
tered with both sides ragged or flush on 
both sides with the extra spaces distribu- 
tion throughout the line. 

By adding program line 15 PRINT AS 
(and 16 PRINT for clarity) you will obtain 
a before-and-after comparison between 
the raw and the processed string. 

This short utility routine shows that a 
computer need not be loaded with mega- 
bytes of memory to clean up its PRINT 
act. Of course, this routine cannot accom- 
plish hyphenation of words. But for the 
modest purpose of making the PRINT 
output of the computer more legible to 
the user, it works just fine. V 

SYNC Magazine 



FOR ZX-81/80/TIMEX (16K) 

* CAST HOROSCOPES COMPLETE 
WITH CHART 
* LOCATE PLANETS 

ASTROLOGY COMPUTES THE POSITION OF THE PLANETS IN THE SKY FOR 
ANY TIME AND ALMOST ANY PLACE IN THE 20TH CENTURY ALSO COM- 
PUTED ARE SIDEREAL TIME AND JULIAN DAYS THESE FEATURES MAKE 
ASTROLOGY USEFUL NOT ONLY FOR THE PURPOSE OF CASTING 
HOROSCOPES BUT ALSO TO ASTRONOMERS FOR LOCATING THE PLAN 
ETS CAST HOROSCOPES FOR FRIENDS AND FAMILY AND PAY FOR AS- 
TROLOGY MANY TIMES OVER' 

DIGITAL POSI-LOAD TAPE WITH INSTRUCTIONS AND CHART $20.00 

OPTIONAL— RECOMMENDED BOOK THE ASTROLOGERS HANDBOOK 
(HARDBOUND) BY SAKOIAN & ACKER— PUB. HARPER & ROW $18.50 

HAM-AID 

ZX81/80/TIMEX(2K) 
• THE ELECTRONIC CALCULATOR 

CALCULATE REACTANCE, RESONANCE. RESISTORS IN PARALLEL AND 
EVALUATE EXPRESSIONS 

POSI-LOAD TAPE WITH INSTRUCTIONS $8.00 

Active Designs 

1108BILTMOREDR. 

NASHVILLE, TN 37204 

615-297-4755 



7 



GAMES PACK 



3 O B.ini. 
City Bomii M 
-■■, . , 1 1 ■ .-. i 

■ 
Sweet TOW 
Slalom 1 8a 
Black Holes •■■ : _16* 



■ SSFTTEfOR 

■ ' ! 



BATTLESHIPS £r 
CRUISERS GAME 



<16K ZX81I 



. 



■ ■ I 

. ■ ■ 

■ ■ 



ONLY Sir ' 



7i 



■ 
Line renumber 

■ 
Search and List 

Search and tepi.n • 

\ rM ipai ■■ 

SPECIAL GRAPHICS ROUTINES 

Hyper graphics nm.U 

f ■'■ 
Reverse 

TAPE ROUTINE ; 

■ ■ 
the* ■ ■■-..■■ 
IK 



FOR I6K ONL Y $9 90 1€4 96/ 



GRAPHICS TOOLKIT 



(ZX81 16K RAM ONLY) 



m MACHINE CO 
Draw Undraw ■■■ . 

a KEM 
. 
■ 
■ 
Foreground On Of 
■ ■ ■ 

■ ■ 
■ 
Border Unborder D h 
■ ■ ■ 

■ 
t .ii 

■ . . 

. 

h 
Print Position Controls 
UP DOWN LEFT, RlGM 

■ 
Ednpnnt Moves neni PRlN ' r 

Scroll' i 

SCROLL. 

. 



Onscreen QrflsCTMfl 
Background On Oft 

■ 
■ 

Search and Replai »- 

. 
Square rti 

■ ■■ 

■ . 

'HlCS 

■ 
RAM, and . . 

■ . ■ -■ GRAPHICS N N ■ 
ybui HAM and lhal 

■ 

~AIL FOR ONL Y$1190'f6 95> 

■ 

■■ 

•■ I 
■ 







19 WAYSIDE AVENUE, WORTHING, SUSSEX. BN13 3 JU Telephone (0*03) CM91 



Make your 
Computer Speak! 

Introducing the Namal Super Talker. 

• Infinite vocabulary 

• 560 common words dictionary 

• 2K x 8 Ram Board to program your own words 

• Attractive plastic casing. 

• Built in speaker 

• Simple to program 
Timex and Sinclair Version Price $99.95 
Spectrum Price $739.95 For any other computer 
with RS 232 Interface Price $759.95 

International money order or certified cheque inclusive of 
Postage and Packaging payable to Namal Associates 

Namal Associates 25 Gwydir Street. Cambridge. CB1 2LG ENGLAND 

Telephone: (0223) 355404 Telex: 817445 

Please rush me (Quantity) Timex Sinclair Super Talkers $99.95 

Please rush me (Quantity) Spectrum Super Talkers $139.95 

Please rush me (Quantity) RS 232 Computer Super Talkers $159.95 

Add Postage and Packaging $4.50 I enclose $ 




Name. 



.Signature- 



Address. 



Hardware Breakthrough! 



*fr ZX-Man 

$14 95 

# Joystick 

$14 95 

* Keyboard 

$7495 

full-size assembled 
w/leatherette case 




FULLY ASSEMBLED KEYBOARD 



1) Fully assembled 

2) Includes Key Cap Legends 



3) 30 Day Warranty 

4) 2X80/ZX81 compatible 

5) Some soldering necessary 



THE INNOVATORS 
ARE COMING 



Call or Write for more information 

American Express, Visa, Master Charge, Money order, pc (allow 2-3 weeks to clear) 

Please add $2.50 postage &■ handling 
Illinois residents please add 5% III. sales tax 

Visit our Showroom 10:00 - 6:00 Monday thru Saturday 
MICROCOMPUTERS PLUS, INC. 

349 EAST MAIN ST. 
GALESBURG, IL 61401 
PHONE: (309) 342-9572 



Cards j 

Welcome^! 






I 



Large Letters for the 
8K, 2K Machine joe carroii 



Getting personal and small business 
computers out into homes and small 
offices depends on having software sup- 
port available. The software writer must 
use his imagination and every tool he can 
find to make his programs self-prompting, 
fast, and easy to use. 

One tool that has been useful to me is a 
Basic subroutine to create 4x4 characters 
for the 8K ROM. The routine works well 
enough and enhances the display. How- 
ever, it is slow. If used repeatedly, the 
delay can be irksome. The annoyance is 
not user-friendly! The obvious solution is 
to write a machine language subroutine 
to do the work. 

Getting Organized 

Like many solutions, this created new 
problems. The first step was to write a 
development program. I came up with a 
flexible, menu driven, decimal, hexa- 
decimal machine code loader, reader, and 
reviewer. 

Next a decision had to be made about 
where to hold the machine code. I 
decided to use REM statements. This is 
the most convenient and sturdy way, and 
the code can be easily SAVEd. There are 
a few drawbacks though which will be 
taken up later. 

Dimensioned arrays were chosen as the 
best way to store the original and 
expanded strings. Arrays are easily 
addressed from the Basic program, of 
course, and, when entered as the first 
variables, they can be addressed by the 
machine code program by indexing from 
the VARS pointer. Each dimensioned 
array will keep its size and indexed posi- 
tion from the VARS pointer constant. 

The Initial Listing 

Let us look at the following program 
which shows the general organization of 
the program. 

1 REM (at least 32 bytes) 

2 REM (l.SOio 160 bytes) 
10 DIM A$(8) 

12 DIM XSU28) 

/ REM will contain 32 graphics char- 
acters used to build each expanded char- 
acter. 

2 REM is the body of the machine code 
subroutine, about 141 bytes plus spares. 

10 DIM A$(8) is the first variable 
loaded into VARS. It is loaded from a 
Basic program with the characters to be 



Joe Carroll, M21 Mimosa Ln.. Huntsvillc. AL 
35810. 



expanded. The address of the first ele- 
ment of AS is <VARS)+6, PEEK 16400 
+ 256 • PEEK 16401 + 6. The file name 
and all use the extra six bytes. 

20 DIM X$(128) is the second variable 
loaded into VARS. It is loaded by the 
machine code routine from A$ to form 8 
expanded characters, 16 bytes per char- 
acter. It forms 4 lines of 32 characters. 
The address of the first element in X$ is 
(VARS) +20. 

Brief Program Description 

The program first finds the address of 
AS and X$, then clears X$. X$ is divided 
into 8 4x4 blocks. For each inverse 
character in AS, the corresponding 4x4 
block in X$ is coded for the inverse 
character set. Next, it finds the address 
of the character generator for each 
character in AS. The character generator 
for a space, CHRS0, starts at 7680 and 
has 8 bytes of all zeros. The character 
generator for the letter A, CHRS38, starts 
at 7680 + (8 x 38) = 7984 and looks like 
this bit pattern: 

7984 00000000 

7985 00111100 

7986 01000010 

7987 01000010 

7988 01111110 

7989 01000010 

7990 01000010 

7991 00000000 

64 characters are generated this way. 
All other characters are combinations or 
inverses of these 64. 

The program divides this bit pattern 
into 16 blocks and loads each bit pattern 
one bit at a time into X$. Now each 
element in X$ has a value between and 
31, which represents a graphics character 
in 1 REM. The last part of the program 
uses this value to load that character back 
into X$. 

Loading the Program 

To load the machine code, enter the 
REM statements as follows: 

1 REM followed by at least 32 char- 
acters and a few spares. 

2 REM followed by at least 150 to 160 
characters. (The character entered is 
immaterial. One convenient way of enter- 
ing is to use 1234567890 and repeat the 
sequence until the required number is 
reached. In this way you can easily count 
how many have been entered.) 

Then to find the addresses of these 
REM statements, add the program in 
Listing 2, hit ENTER, and RUN 1000. 
After you find the addresses, write them 
down. No, not on the blotter. Be organ- 
ized and keep notes that you can refer to 



8KROM 
2KRAM 

later. The 1 REM statement should start 
at 16514. 

Figure 1 gives the hexadecimal and 
decimal listings to load into 1 REM. The 
first 16 are graphics characters for normal 
characters. The next 16 are inverse char- 
acters. If you are using the decimal 
machine code loader in Listing 1, hit 
RUN, and enter the numbers from the 
decimal column in Figure 1. 

The next step is to load the body of the 
program into the 2 REM statement. Since 
it is about 141 bytes long, reserving about 
160 bytes in 2 REM is recommended. 
There is a step near the end of the pro- 
gram that contains the code 7Eh (126d). 
This code will exist in a REM statement, 
but it will not display when listed and 
neither will the next five codes. This is no 
problem for the program unless you try 
to EDIT 2 REM or change the length of 1 
REM. This can cause the last six bytes of 
the program to disappear. Having extra 
bytes at the end of the program can save 
you trouble if you have to POKE the last 
six bytes back in. PEEKing is the only 
way to find out if they are still there. 

Earlier in the program is the code 7Fh 
(127d). The only problem this can cause 
is that it prevents you from driving the 
cursor past that point. If it is necessary to 
do so, just POKE a zero into that address, 
then remember to POKE 7Fh ( 127d) back 
later. Using the editor is certain to cause 
the loss of the last six bytes. 

The body of the program is divided 
into four parts for analysis and trouble 
shooting. 

Part 1. Initializing 

Part 1 is not very complicated. It finds 
the addresses of AS and X$. then clears 
X$. Figure 2 is the hexadecimal listing: 
Figure 2a, the decimal. Load Part 1 into 
the 2 REM statement (remember where 
you wrote that address?). If you are using 
Listing 1, change line 110 to read: 
110FORA = P1 TOP1+22 
PI is the address of the second number 
found in running Listing 2 above. The 
program will run itself if you add a return 
code to the end of Part 1: C9h (201d). 
Again save the addresses for use in Part 
2. 

Now RUN the Basic program to load 
A$(8) and XS(128) into the VARS area. 
Before you RUN the machine code pro- 
gram, SA VE it on tape. 

To test Part 1, enter PRINT USR X as 
a command (X is the address of the 2 
REM statement) and press ENTER. You 
should get 14 on the display with a 0/0 
error code: and PRINT X$ should return 
four lines of empty spaces, regardless of 
what was in AS or X$ before, and a 0/0 
error code. If you got all this, you are 
ready for Part 2. 



November/December 1982 



65 




CHIRPER module for your ZX81 
or your timex/sinclair 1000. 

The CHIRPER module lets you enter keyboard 
data fast and accurately A sound can be heard 
when a key has been entered enabling you to 
spot a double entry or missed entry without 
looking up at the screen 

The CHIRPER sound is produced when a pro- 
gram runs A key entry results in a buzz-like chirp 
on 1 K or 2K machines. Large programs in a RAM 
pack produce a continuous sound that chances 
pattern on key entry 

The CHIRPER module installs easily inside the 
ZX81 case with only 3 wires to connect Complete 
installation instructions included 

Send a check or money order We pay the postage 
in the USA or Canada. 

M?E)D®(£IR&IPiK3 @© e 

3584 Leroy, Ann Arbor. Ml 48103 



ZX80 ZX81 TIMEX MICROACE 

CRASH NOT. WANT NOT. 

Have you had unexplamable system crashes 9 Lost 
programs due to brownouts or power failures 7 Or 
lust plain tripped over your electric cord'' 

If so. you need an uninterruptable power supply 

UPSYSTEMS is a battery powered backup system 
that kicks in automatically as soon as its sensors 
detect a drop in voltage coming from your power 
supply Your system keeps on ticking 
Simple to install and use Just plug your power cord 
into UPS and plug UPS into your system and you 
are ready for any power glitch or failure (Additional 
cord included) 

All systems include on/oft/reset switch for your 
convenience (you no longer have to unplug your 
computer to reset it) All systems are compact, ap- 
prox 13cmx7cmx4cm (5' a x 2H' x 1V) 

UPS-1 Economy system, uses 2-9 volt alkaline 
batteries (not included) $14.95 - $2 00 
shipping, handling & insurance 

UPS-1M Same as UPS-1 except it includes a Pro 
gram Loading Monitor to solve your tape 
loading problems $1995 ♦ $2 00S.H4I 

UPS-2 MCd system that recharges itself auto- 
matically (NiCd battery included) $29 95 
♦ $3 00 S. H&l 

UPS-2M Same as UPS-2 except it includes a PLM 
$34 95 + $4 00 S. H&l 

90 Day Guarantee on Parts and Labor 

Check or money order payable to UPSYSTEMS 
Foreign orders add $1 00 

UPSYSTEMS 
RA BANKS 
5800 HOLLISTER 
OEPT 1901 
HOU TX 77040 



If, on the other hand, the program 
crashed, reLOAD what you SAVEd. Now 
check to see if the "Push" and "Pop" 
codes balance. (See Figure 2, source state- 
ment column.) These codes push and pop 
two bytes on and off the machine stack. 
The stack also contains the address to 
return to Basic. So if the Push and Pop 
codes do not balance, the machine will 
not return to Basic. 

Error code 2/0 after PRINT A$ or 
PRINT X$ indicates that the variables 
area has been altered. Check the A$ and 
X$ address loaders. 

Part 2. Inverse Character Check 

Part 2 checks each element in A$ for 
inverse characters. For any inverse char- 
acter found in A$, the corresponding 4x4 
block in X$ is incremented. This incre- 
ment will cause Part 4, the interpreter, to 
use the inverse graphics section of the 1 
REM statement. 

Load Part 2 immediately after the last 
byte of Part 1. If you ended Part 1 with 
the return code, C9h (201d), replace it 
with the first step of Part 2, or POKE a 
zero (NOP code) in its place. Otherwise 
the program will not run beyond Part 1 . 
Figure 3 is the hexadecimal listing; Figure 
3a, the decimal listing. If you are using 
Listing 1, change line 1 10 to: 

110 FOR A=P2 TO P2+38 
P2 is PI + 22. Write down the address of 
P2 + 38 for use as P3 in Part 3 below. 

To test Part 2, end it with the return 
code, C9h (201d), as we did for Part 1. 
PRINT USR X should return 28 on the 
display with a 0/0 error code. PRINT X$ 
should return 4x4 empty spaces for each 
normal character in A$, and 4x4 blocks 
of CHRS1 for each inverse character. 

If you do not get this, or if the program 



Figure 1. Contents of 1 REM statement (Hei). 
Hex Code Decimal Comment 



16514 


00 





16515 


37 


135 


16516 


04 


4 


16517 


83 


131 


16518 


02 


2 


16519 


85 


133 


16520 


06 


6 


16521 


81 


129 


16522 


01 


1 


16523 


86 


134 


16524 


05 


5 


16525 


82 


130 


16526 


03 


3 


16527 


84 


132 


16528 


07 


7 


16529 


80 


128 


16530 


80 


128 


16531 


07 


7 


16532 


84 


132 


16533 


03 


3 


16534 


82 


130 


16535 


05 


5 


16536 


86 


134 


1 6537 


01 


1 


16538 


81 


129 


16539 


06 


6 


16540 


85 


133 


16541 


02 


2 


16542 


83 


131 


16543 


04 


4 


16544 


87 


135 


16545 


00 






— Listing 1. Decimal Machine Code Loader 

iae REM MHCHINE CODE LOfiDER, P[ 

IMRL 

110 FOR R=16S14 TO 16S45 

12Ci IF PEEK lS4.4-2-:3 THEM SCROL 

130 PRINT R, 

14-0 INPUT DEC 

150 POKE B,DEC 

160 NEXT R 

17B STOP 



Listing 2. REM statement address localer. 

i'300 FOR F =16509 TO 167O0 

1010 IF PEEK F=S34 THEN PRINT F+ 

1 

1320 NEXT F 



66 





He 


Figure 3. Inverse character sorti 
OP Statement C 


ng routine (Hex). 


Hex Co. 


omment 


D5 




PUSH DE 




save A* addr 


E5 




PUSH HL 




save X$ addr 


01 1C 


08 


LD BC NN 




A4 Chr counter 


C5 




PUSH BC 




save Chr cntr 


1A 




LD A <DE) 




code A* 


13 




INC DE 




next A* 


D5 




PUSH DE 




save A* addr 


E5 




PUSH HL 




save X* 


FE 7F 




CP N 




check for inverse 


38 DD 




JR. NC 




jump i -f not 


06 04 




LD B N 




X* row cntr 


C5 




PUSH BC 




save X* row cntr 


06 04 




LD B N 




X* column cntr 


34 




INC(HL) 




mark inv chr 


23 




INC HL 


; 


next X* 


10 FC 




DJ NZ 




loop column ctr 


09 




ADD HL BC 




next X* row 


CI 




POP BC 




row cntr 


10 F5 




DJ NZ 




X* row loop 


El 




POP HL 




X* addr 


01 04 


00 


LD BC NN 




X* chr disp 


09 




ADD HL BC 


; 


next X* addr 


Dl 




POP DE 


» 


next A* addr 


CI 




POP BC 




Chr cntr 


10 El 




DJ NZ 


! 


Chr loop 


El 




POP HL 




X* addr 


Dl 




POP DE 


: 


A* addr 










SYNC Magazine 



check Part 1. Do not forget to SAVE 
everything on tape before you RUN any- 
thing. If you got everything except the 
4x4 blocks of CHRS1 for inverse char- 
acters, check to see whether you forgot 
to remove or replace the return code 
after Part 1. 



Part 3. Bit Shuffling 

Part 3 is the most complicated part, 
and the heart of the whole program. It 
locates the Character Generator in the 
8K ROM for each character in AS. Then 
it shuffles each bit from the Character 
Generator to the proper address in X$. 



Figure 2. Initializes program by getting addresses of AS and X$ (Hex). 



Hex Code 



2A 

01 

09 

E5 

OE OE 

09 

E5 

3E 00 

06 80 

77 

23 

10 FC 

El 

Dl 



10 40 
06 00 



OP Statement 

LD HL <NN) 
LD BC NN 
ADD HL BC 
PUSH HL 
LD C N 
ADD HL BC 
PUSH HL 
LD A N 
LD B N 
LD<HL) A 
INC HL 
DJNZ 
POP HL 
POP DE 



Comment 

VARS pox 
disp to 
At addr 
save A* 
disp to 
X* addr 
save X* 
zero A 
X* size 
zero X* 
next X* 
X* loop 
X* addr 
A* addr 



nter 
A* 



addr 

X* 



addr 

eg 



addr 
addr 



Figure 3a. Inverse character sort (Decimal). 



42 
16 
64 
1 

6 



Figure 2a. Initialization (Decimal). 

229 

62 



6 

123 

119 



9 

229 

14 

14 

9 



16 

252 
?25 
209 



213 

229 

1 

28 

8 

197 

26 

19 

213 

229 

254 

127 

56 



13 

6 

4 

197 

6 

4 

52 

35 

16 

252 

9 

193 

16 



245 

225 

1 

4 



9 

209 

193 

16 

225 

225 

209 



Hex Code 

06 08 

C5 

1A 

E6 3F 

13 

D5 

E5 

21 FB ID 

11 08 00 

47 

04 

19 

10 FD 

EB 

El 

06 04 

C5 

06 02 

C5 

1A 

ES 

06 04 

17 

CB 

17 

CB 

23 

10 F7 

El 

13 

CI 

10 ED 

01 20 00 

09 

CI 

10 E3 

11 7C 00 
ED 52 

Dl 
CI 
10 C4 



Figure 4. Bit shuffling loops (Hex). 

OP Statement Comment 



16 



16 



LD B N 
PUSH BC 
LD A (DE) 
AND A 
INC DE 
PUSH DE 
PUSH HL 
LD HL NN 
LD DE NN 
LD B A 
INC B 
ADD HL DE 
DJ NZ 
EX DE HL 
POP HL 
LD B N 
PUSH BC 
LD B N 
PUSH BC 
LD A (DE) 
PUSH HL 
LD B N 
RLA 

RL (HL) 
RLA 

RL (HL) 
INC HL 
DJ NZ 
POP HL 
INC DE 
POP BC 
DJ NZ 
LD BC NN 
ADD HL BC 
POP BC 
DJ NZ 
LD DE NN 
SBC HL DE 
POP DE 
POP BC 
DJ NZ 



At chr cntr 
save At chr cntr 
At chrt 
mask A<64 
next At addr 
save next At addr 
save Xt addr 
Chrt gen addr— 8 
Chrt gen addr incr 
loop counter -for 
Chrt gen addr 
At Chrt gen addr 
loop -for Chrt gen 
At Chrt gen in DE 
Xt addr 
dbl row cntr 
save dbl row cntr 
single row cntr 
save sngl row cntr 

1 byte o-f Chrt gen 
save Xt addr 

2 bit cntr 

1 bit from Chrtgen 

1 bit into X* 

1 bit from- Chrtgen 

1 bit into Xt 

next Xt addr 

loop ntr 

Xt addr 

next Chrtgen addr 

single row cntr 

loop sngl row cntr 

Xt row incr 

next Xt row 

dbl row cntr 

loop dbl row cntr 

Xt disp 

Xt addr new chr 

At addr 

At chr cntr 

loop At chr cntr 



STAR VENTURE 
GAME: 

Seek out and destroy enemy 
vessels to move up in Star Fleet 
ranks. 

Program listing $2.95 

Cassette $4.95 & 

$1.00 shipping 

OTHER PROGRAMS 
AVAILABLE 

SASE for Brochure 

Dependable Load 

monitor $495 

8K/16K.ZX80/ZX81. 

DSBC 

P.O. BOX 1251 

DOLAN SPRINGS, 

ARIZONA 86441 




NEWSLETTER 

EVERY MONTH OUR 
SUBSCRIBERS RECEIVE 

programs -projects 
reviews — articles 
and more! 
SAMPLE ISSUE AND FREE 
PROGRAM 




send $1.00 (shpg.) 
BOX 2411 VISTA, CA 92083 



"For Adults Only" 

An adult program to add 
spice to your life. Not a game, 
but an aid to better under- 
standing of your lovers 
desires. You'll enjoy this pro- 
gram if you enjoy loving . . . 



$ 19*95 +1.50 p&h 
Florida resident add 5% tax 



••jii°'» 



' BOH 1*0?t ■ JACKSONVILLE, FLOWIOA 1JJM 




November/December 1982 



67 



The key to the bit shuffling is in two 
codes: 17h, RLA and CB 16,RL (HL). 
RLA shifts each bit in Register A (in the 
CPU) one place to the left, and overflows 
to the Carry Flag (in the CPU). The bit 
that was in the Carry Flag rotates back to 
Register A. RL(HL) works the same way 
using the byte at the address in Register 
HL. 

Part 3 uses several loops to load Regis- 
ter A with a byte from the Character 
Generator and load Register HL with an 
address in X$. Then the RLA code shifts 
one bit from the Character Generator to 
the Carry Flag, and RL (HL) shifts that 
bit into the address in X$. Four bits are 
shifted, one bit at a time, into each of the 
128 addresses in X$. If shuffling 512 bits 

Figure 4a. Bil shuffling loops (Decimal). 



6 


4 


23 





8 


25 


203 


9 


197 


16 


22 


193 


26 


253 


23 


16 


230 


235 


203 


227 


bZ 


225 


22 


17 


19 


6 


35 


124 


213 


4 


16 





229 


197 


247 


237 


33 


6 


225 


82 


248 


2 


19 


209 


29 


197 


1°3 


193 


17 


26 


16 


16 


8 


229 


237 


196 





6 


1 




71 


4 


32 





into 128 addresses sounds a little tedious, 
I assure you, the whole program runs 
faster than you can blink. 

Figure 4 is the hexadecimal listing for 
Part 3. Figure 4a is the decimal listing. 
Enter Part 3 the same way as you entered 
Part 2. Be sure to remove or replace the 
return code, C9h (201d), from the end of 
Part 2. If you are using Listing 1, change 
line 110 to: 

110FORA=P3TOP3+62 
P3 is the address plus 38 from Part 2. 
Write down the address for Part 4. 

If you have been doing well so far. 
enter Part 4, the interpreter, too. It is 
only 19 more steps. 

If you add the return code, C9h (201d), 
and test the program, you should get the 
same display as before, except PRINT X$ 
should return four lines of characters 
between CHRSO and CHRS31 for each 

Listing 3. 1 REM and 2 REM 



1 REM (33 GRSPHICS CHARACTERS 

2 REM (14.1 PROGRAM STOPS) 
10 DIM R*(B) 

13 DIM X*(12e) 

14. LET X=ieS40 



Listing 4. Sample application. 

ISO PRINT ■ENTER PHRASE" 

HO INPUT At 

112 CL5 

120 LET L=U5R X 

130 PRINT fi* 

14.8 PRINT 

1SB PRINT X* 

ISO PRINT 

170 goto ioe 



character in A$ that is not an empty 
space. 

If you went ahead and loaded Part 4. 
the interpreter, PRINT X$ should return 
the finished product, an exact 4x4 enlarge- 
ment of each character in A$. Note that 
Part 4 already ends with the return code, 
C9h (201d). Troubleshoot as before. 

Part 4. The Interpreter 

Part 4 is the shortest and easiest part of 
the program. It has only one loop. It 
loads the HL Register with the 1 REM 
statement address. The 1 REM statement 
holds the graphics characters that build 
each 4x4 character. For each address in 
XS, the value at that address (0 to 31) is 
added to HL. The graphics character 
found at HL + (0 to 31) is then placed 
into X$. This will loop 128 times to 
interpret each element of X$. 

If you are using Listing 2, make this 
change: 

110FORA=P4TOP4+18 
P4 is P3 + 62. 

Figure 5 is the annotated hex listing for 
Part 4. Figure 5a is the decimal listing. 
Part 4 contains the code 7Eh (126d) which 
will not display in a REM statement. 
Neither will the next five characters, but 
they do exist in the REM statement and 
will run in a machine language routine. 

Remember that using the EDIT key on 
2 REM or moving 1 REM can cause you 



ANNOUNCING a new software program for TIMEX/ 
SINCLAIR TS1000 and SINCLAIR ZX81 computers. 
(Requires 16K RAM memory pack) 

LfflSTIN SPACE 

by Michael C. Hoffman 

I? 

You're the captain ot an experimental space ship that can't be detected by enemy 

ships 

Suddenly, an electrical fire is reported by the navigator It is quickly extinguished, but 

the damage is severe. 

The auto-pitot, main engine and laser gun won t respond, so you switch to manual 

and auxiliary thrusters. The only working controls are the rotate right and left 

thrusters Checking the status monitor indicates only 30 lbs of fuel is left. 

Dunng the crisis, your ship wandered into a meteor shower You must maneuver left 

or right to avoid hitting meteors and enemy ships 

Your new mission is to locate the fleet of friendly fuel ships and attempt to land on 

one in order to refuel and continue the journey. 

FEATURES: 

Rotate right and left thrusters 2 types of meteors 2 types of enemy ships 1 
fleet of friendly fuel ships. 1 0,000 bonus points. Bonus game 30 lbs bonus 
fuel Status monitor for fuel and score (Real-time) Auto-run Many 
prompts Manual replay Moving graphics Flicker-free Moving graphic 
title for the beginning and end of program. 

CONTROLS: Press key # 

Rotate right thruster 8 

Rotate left thruster 5 

Status monitor for fuel left and score 

Manual replay {When prompt asks if you want to play 
another game; yes or no?) Y(ENTER) 

(or) N (ENTER) 

As you steer past the meteors and enemy ships, you accumulate valuable points 
Try to land on a fuel ship to refuel (30 lbs bonus fuel) and continue into hyperspace 
(10,000 bonus points will be added to your current score and to the new game 
already in progress.) 

LOST IN SPACE is prerecorded on a computer certified cassette tape, 

in a protective see through ABS plastic case GUARANTEED LOADING Included is 
our detailed instruction manual. 

(File name) "US" Si i 95 

(Please add $1 .50 for shipping and handling NJ residents 5% tax ) 

(Dealers wanted ) M.C HOFFMAN CO., PO BOX 1 1 7. OAKLAND. NJ 07436 



PREMIUM DATA CASSETTES 

'MANUFACTURERS WHOLESALE PRICES* 



LENGTH 


10-PACK 


100-PACK 


500-PACK 


C-10 


59EA. 


.54 EA. 


.45 EA 


C-20 


.66 


61 


.53 


C-60 


89 


83 


.79 


C-90 


S1.29 


$1.21 


$1.14 



SOFTWARE PUBLISHERS —LET ACTS AUDIO 
PROVIDE YOU WITH ALL YOUR CASSETTE 
PRODUCTION REQUIREMENTS. 

CUSTOM SOFTWARE DUPLICATION — FOR 
SINCLAIR, TRS-80, APPLE, ATARI — GUAR- 
ANTEED TO LOAD. 

ACTS AUDIO ALSO SELLS HIGH-SPEED 
DUPLICATION EQUIPMENT MODIFIED FOR 
SOFTWARE DUPLICATION. 

ACTS AUDIO, INC. 

70WESTILLIANAAVE., 

ORLANDO, FL. 32806 

(305)423-0338 

Pay by check, Mastercharge or Visa. Add $5 for 
C.O.D. shipments. Florida residents add 5% sales 
tax. No shipping to P.O. Boxes. Shipping by 
U.P.S. to continental USA only. For shipping and 
handling add $2 for 10 pack, $5 for 100 pack, $12 
for 500 pack. 



68 



SYNC Magazine 



TS1000-ZX81 

OWNERS 





TM 



pen 

WIN $20,000 or more 

KRAKIT " is an adventure and a treasure hunt for the ZX81 
and TS1000 computers. The bank account and prize money 
actually exist. Be the first to crack the puzzle and the prize 
is yours. Only one prize will be awarded. 

SOLVE 12 CLUES LIKE THIS! 

* ^ 

Where it all began. Where the torch was first lit. 
Where muscles and sinews strain. Where our heros 
win acclaim. Where the symbols hold the key. 



KRAKIT" consists of 12 clues on a ready-to-run ZX81 or TS1000 
cassette tape (16k RAM). The answer to each clue is the name of a 
country, a city or town, and a number. If you are the first qualified 
entrant to solve all 12 clues and declared the winner, you receive two 
tickets to the city of the secret KRAKIT'" vault location. When you arrive 
at that location, a check for a minimum amount of $20,000.00 (U.S.) will 
be presented to you. The amount of the prize money is augmented weekly 

TS1000-ZX81 



1. The first qualified entrant to be 
confirmed by the judges to have 
completed all the clues correctly is 
winner. 

2. There will be one winner only. 

3. No persons connected to 
International Publishing & Software 
or their families are eligible to enter 
KRAKIT 

4. This offer is not valid where 
prohibited by law 



RULES 



the 



Inc. 



5. Due to the confidential nature of 
KRAKIT we regret we are unable to 
enter into any individual 
correspondence. All the required 
information, including how to claim the 
prize, is on the computer tape. 

6. The winner will be required to sign an 
affidavit of compliance with these rules. 



& 



INTERNATIONAL PUBLISHING & SOFTWARE 
P.O. BOX 1654, BUFFALO, N.Y. 14216 



NO 



w 



Mail to: 

INTERNATIONAL PUBLISHING & SOFTWARE INC. 

P.O. BOX 1654, BUFFALO, N.Y. 14216 



■>•§■ 



Please send copies of KRAKIT 

at $19.95 plus $1 50 shipping. 

Total enclosed is LJ check 

LJ money order 

Charge to □ Visa □ Mastercard 

Number 

Expiry Signature 



Please print: 



Name 



Address 

City 

Zip 



State 



Allow 2 weeks for personal checks. 



Dealer inquiries welcome. 



other FINE 
PRODUCTS 
from 

INTERNATIONAL 
PUBLISHING k«U 

3952 Chesswood Drive 

Downsview, Ontario, Canada M3J 2W6 



• GAMES • GAMES • GAMES • 



MARINE RESCUE: last action underwater 
TANK TRAP: destroy enemy planes & lane! 

mines 
GALAXY INVADERS: repel fleets of invaders 
INVADERS: the classic computer game 
ZX SCRAMBLE: a fast-moving space game 
CROWN & SCEPTER: a medieval adventure 
GALACTIC COMMANDO: a space war 

adventure 
TRACK DOWN: an adventure in the old west 
BLACKJACK: as played in Vegas 
SLOTS: beat the one-armed bandits 
ZX CHESS I: 6 levels: black or white: save 

games 
ZX CHESS II: chess master: 7 levels, champion 

rated 
1K CHESS: 1 level: no castling or en-passant 
PLANET OF FEAR: find your stolen spaceship 
INCA CURSE: get gold out of the temple 
SHIP OF DEATH: free your ship from an alien 

cruiser 
NANTIR RAIDERS: arcade game: 4 waves of 

attackers 
GOBBLE MAN: famous arcade game: chase 

ghosts in a maze 
1K GAMES: 11 games for unexpanded 

ZX81/TS1000 
SHOOT OUT: how fast are you "on the draw" 

FAMILY EDUCATION & HEALTH 
& ENTERTAINMENT 



WEIGHT CONTROL: a personalized weight 

loss program* 
CONSTELLATION: your computer is your 

telescope* 
SOLAR SYSTEM FILE: a databank on the 

solar system* 
BIORHYTHMS: plot your physical, emotional. 

intellectual cycles* 
BOOK OF DAYS: facts, trivia, birthdays in a 

datafile* 
PERSONAL RECORDS 
STORAGE SYSTEM: create a personal 

datafile* 
FLASHCARD: memory aid. learning aid. testing 

device 
MOVIE HANGMAN: guess the movie: beat the 
Hangman 



PROGRAMMING AIDS 



Z-AID 1.0: a machine code programming aid 
ZX BUG: for debugging, editing & running 

machine codes 
ZX ASSEMBLER: powerful tool for machine 

code programs 
TOOLKIT: add 9 commands to basic, including 

renumber 
ZX FORTH: ease of basic with machine code 
speed* 
* comes complete with a detailed guide 

DEALER ENQUIRIES INVITED. 



Figure S. Interpreter I Ilex I 



Hex Code 


OP Statement 


Comment 


21 06 


00 


LD HL NN 


: X* disp 


19 




ADD HL DE 


; X* addr 


EB 




EX DE HL 


; X* addr in DE 


Olb 80 




LD B N 


; X* loop cntr 


21 82 


40 


LD HL NN 


; 1REM addr 


1A 




LD A (DE) 


; X* coded byte 


85 




ADD A L 


; increment HL by 


6F 




LD L A 


; X* chr code 


7E 




LD A (HL) 


; get graphics chr 


12 




LD(DE) A 


; put into X* 


13 




INC DE 


; next X* addr 


10 F5 




DJ NZ 


s X* loop 


C9 




RET 


; return to BASIC 


Figure 5a. Interpreter 


(Decimal). 


Listing 5. Four Times Square Billboard. 




100 PRINT "ENTER MCSSAQE" 




26 




192 INPUT I* 


6 


133 




104 Ct-S 

1.06 LET I* = I**" *** " 





1 1 1 




110 FOP F = l TO LEN I* 


25 


126 




1 13 CL5 


235 


18 




120 LET fi*=<=i*ia TO S'l*I*(F) 




130 LET L=USR X 


t. 


19 




140 PRINT P,T 10.0; X* 


128 






150 PRUSE 2© 






153 POKE 16437. S55 


33 


245 




160 NEXT F 


1 30 


201 




170 GOTO HO 


64 





to lose the last six bytes of the machine 
code. You will have to PEEK to see if 
they are there. The program will crash if 
they are not. If you do lose them, just 
POKE them back. 

Using the Program 

The whole program is 141 bytes long, 
and, if you are careful, there is no reason 
you cannot load the whole thing at once. 



how each part worked and how to 
troubleshoot. Turn now to Listing 3. The 
address of the first byte of the body of the 
program is 16540 because there are a few 
spare bytes in the 1 REM statement. If 
yours is different, do not change your 
program to use 16540. Change X to equal 
your address. 

The easiest application is to add the 
short routine in Listing 4 to Listing 3. 



After entering the program and running 
it, I think you can start to appreciate its 
speed. Still you could do the same thing 
with a Basic subroutine. It would just run 
a little slower. 

Now try Listing 5. If you have the 
improved ROM you can omit line 152; if 
you have SLOW mode, you can omit lines 
150 and 152. After you have entered and 
run this listing, you will see how versatile 
the program can be. Now try that with a 
Basic subroutine. The machine code 
makes all the difference. It is fast enough 
for repeated use without slowing down 
the display. Another idea is to modify the 
1 REM statement to create special print, 
such as segmented characters. With a few 
extra basic steps, you could even perform 
a double expansion, which would display 
two 16x16 characters. 

It is time to use your imagination. You 
may already have several programs that 
would benefit from large letters, perhaps 
an educational program that rewards cor- 
rect answers with a big "ATTA BOY!" 

If you have never used machine code 
before, go ahead and get your feet wet 
with this one. You will find that your 
programs are more user-friendly, and that 
this machine code subroutine is so easy 
to use. It could be called programmer- 
friendly. 

1 would like to hear of your trials and 
tribulations with this program, care of 
S YNC Magazine. H 



1982 TAX RETURN HELPER 

A set of 7 ZX81/TIMEX programs (16K RAM) for the 1982 tax 
return. Data is interactively entered/examined/modified and the 
results can be immediately seen. The programs perform all 
computations and even detect some of your errors. Like in an 
electronic spreadsheet, when you make a change, all the lines 
affected by it are updated on the spot. So you can explore "what if" 
alternatives. Or you can add a deduction remembered at the last 
moment and get that entire form corrected without effort. The 
forms can be printed and/or saved on tape for future use. Form 
1040 and Schedules A, B, C, C1/C2, D and E are featured. 
The 1982 edition will be available in January 1983. The cost - $14 - is 
tax deductible. (Only $7 for the buyers of the 1981 edition.) 

ARTIST 

ARTIST is a ZX81 TIMEX (16K RAM) program that, with more 
than 30 commands helps create drawings/paintings on screen. 
Features include: 4 modes (DRAW, ERASE. MOVE with user 
defined step, PAINT with user defined brush); 8 directions of 
movement in every mode; background fill; position save and recall; 
easy graphic specification of lines, circles and half circles; ability to 
define, store and recreate complex patterns anywhere on the 
screen; ability to save the artwork on tape or print it. 

ARTIST is very easy to learn and use. 4-year-old kids master its 
basic commands in minutes. Most commands require pressing of 
only one key (no enter needed) and numeric coordinates are not 
necessary. No knowledge of Basic is needed. At the same time, 
advanced features support the creativity of sophisticated users, 
which can define their own commands; for them, ARTIST offers an 
extensible graphic command language. User defined commands 
can be nested (even recursively) and are saved on tape. 
Cassette and instructions - $10 ($12 outside U.S.). 
From: KSOFT, 845 Wellner Rd.. Naperville, IL 60540 

70 



N€UU! Fast fiction Game of Skill 

FURIOUS 




ONLV $12.95 

HIGHSCOR6! 
HIGHSP66D! 
CHRUCNGING! 

ZX81 
16KRAM 



Send Check or Moneu Order for $12.95 

Plus $1 .50 for Shipping and Handling to: 

DRCDfllUS SOFTWARE 

8442 Cozucroft 
Canoga Park, California 91306 

SYNC Magazine 



from 



games 



Scramble 







The high-speed a 
game. Easily the 
available. 32 zones, 
thrust and altitude 
controls. 



Supplied on cassette 
with hnrarycase 

ONLY $7.95 



Other great ZX games and add-ons 
from Mikro-Gen: 



Space Invaders 

the best you can get, with 
ever-increasing rate of play 

Breakout 

with seven bat angles to make 
it really difficult 

Bomber 

positively addictive 

ZX Chess 

The original - and still the best • 

Sorcerer's Castle 

takes you into a world of 
magical adventure 



A/0 Converter Board 

Lets you connect analogue 
joysticks to the ZX81 digital 
inputs Suitable for many other 
applications, easy to connect - 
and it improves RAM pack 
stability! 
ONLY S36.95 

Joysticks 

Connect via our A/D Board - 

makes your ZX81 a true 

programmable games 

machine 

ONLY $18.95 EACH 

Disassembler/Monitor 

An absolute must when 
learning machine code- 
lets you enter and run your 
own code 



$7.95 each [ZX Chess 512.95 1 ONLY $7.95 

Write tot full details of the Mikro-Gen range of programs and add-ons. 

-etrom local stockists or direct from the manufacturers (please make 
cheques/POs payable to Mikro-Gen and add $1 90 postage for software 
S3.50 for hardware Supp „ efs ol SoMwa , e (0 s , nclJ 




Unique So f t war e> j 



for you r 



consideration^ 



VIRTUOSO . . . 

a music synthesis program with ten octave range 
at any tempo to accommodate songs up to 96 notes. 
Recordable pulse waves generated at a mike jack. 
Can be heard or amplified on any TV. Uses a single 
BASIC instruction. SAVE YOUR SONGS! Hardware? 
Any cassette recorder. 

KALEIDOGRAPH . . . 

enjoy kaleidoscopic simulation in a 22 x 22 pixel 
display composed of randomly selected graphic 
pixels with two axes and an exciting center of 
symmetry. 

Both for Timex Sinclair 1000; ZX80/81; 8K; ROM; 
2K- ; RAM computers. Each only S6.95 pp. Add $3.00 
ex-USA 
Quantity; Virtuoso Kaleidograph 

Name; 

Address. 

City/State/Zip: 

Remittance to: William Don Maples 

688 Moore St.. Lakewood. CO 80215 



TS1 000 AND ZX81 OWNERS 


0/\ PROGRAMS: $9.95 

SW BAR CHART, ETCH-A-SCREEN, INTEREST, 
fc ^J SPELLING, CHECKBOOK . . AND 15 MORE! 

EXTENDED MEMORY NOT REQ'D\ 


11SY82 

SEND CHECK OR MONEY ORDER 

TO: 

COMPUTHINK, INC. 

P.O. Box 603 
Hopkins, MN 55434 


I'VE GOT A #TS1000 [JZX81 
(CHECK ONE) 


QTY 


DESCRIPTION 


COST 




r\r\ PROGRAMS 

CAJ CASSETTE $9 95 EA 






r\f\ PROGRAMS 
C\j MANUAL $13.95 EA 






BEST BUY! BOTH $19 95 SET 






SHIPPING AND HANDLING 


1.25 


TOTAL (MN RESIDENTS ADD) 
5% SALES TAX) 




NAME 


SHIPPING LABEL— PLEASE PRINT! 


STREE 


r 


CITY 


STATE ZIP 






SOUND with ZX-81! 



SOUND with ZX-81 ! 

MAKE AMAZING SOUND EFFECTS WITH YOUR ZX-81 



Timex 

Sinclair 

1000 

$49.95 Tup 7HM Y ftl 

Incl airmail postage I L. LUIl /V"U I 

* The ZON X-81 SOUND UNIT is completely self-contained and espe- 
cially designed for use with the ZX-81 . It just plugs in — no dismantl- 
ing or soldering. 

* No power pack, batteries, leads or other extras. 

* Manual Volume Control on panel — ample volume from built-in loud- 
speaker. 

* Standard ZX-81— 16K Rampack or printer can be plugged into ZON 
X-81 Sound Unit without affecting normal ZX-81 operation. 

* Huge range of possible sounds for games or: Music, Helicopters, 
Sci-Fi, Space Invaders, Explosions, Gun-shots, Drums, Planes, 
Lasers, Organs, Bells, Tunes, Chords, etc. , orwhateveryou devise! 

* 8 full octaves. Uses 3-channel sound chip giving programme control 
of pitch, volume of tones and noise, all with envelope control. 

* Easily added to existing games or programmes using a few simple 
"BASIC" lines or machine code. 

* No memory addresses used — I.O. mapped. 

FULL Instructions with many examples of how to obtain effects and the 
programmes, supplied. Fully Guaranteed. 

Payment may be made by Bank Cheque or International Money Order in 
U.S. $ or £ Sterling Payable to: 



sfc 




J 





rri 



s 



_ T i 



P.O. Box 6 
Ware, Herts 
England 
Phone #0920-3182 



Visa-Mastercard accepted 
Send account # 
with name & address 




8KROM(4KROM) 
IK RAM 



WARP 81: 

Making a 4K Program 

Run in 8K Chuck Bonner 



When I first got my ZX81 kit assem- 
bled, I was all fired up and ready to learn 
programming. I planned to buy books 
with titles like "97 Ready-to-Run Games 
in Basic" at ten for a dollar. They are 
usually far from "ready-to-run," but 
debugging them is an excellent way to get 
started with a new computer. Unfortu- 
nately, programs that fit into IK RAM 
are relatively hard to find. 

When the May /June issue of SYNC 
arrived, some possibilities opened up with 
"Space Warp" by Armando Fox. I 
scanned the article, paying particular 
attention to the last paragraph, which 
described the clever way of storing the 
graphics for the spaceship. Then I entered 
Listing 1 according to the instructions. 
POKEing the values listed in the article 
went fine until the eleventh value (zero). 
Suddenly, the screen went blank, and the 
keyboard had no effect! 1 unplugged the 
computer and started over, with the same 
results. 

A Mystery 

Why can't I set up the graphics as Mr. 
Fox did? Looking at the article again, I 
finally noticed that it was for the 4K 
ROM. 

Chuck Bonner. 145 Allen St.. Norfolk. VA 23505. 
November/December 1982 



The Challenge 

We should be able to make this pro- 
gram run in the ZX81 . Let's give it a try . 

First, what is the difference between 
4K Basic and 8K Basic? Obviously, 8K 
machines have something in memory 
locations 16427 to 16441 which should 
not be changed. Other than that, the 
listing has things like "GO TO" and "GO 
SUB" instead of "GOTO and "GOSUB". 
No problem. Also, the way random 
factors are entered in lines 200, 210, 260, 
and 660 of Listing 2 is different from the 
way it appears in the ZX81 BASIC Pro- 
gramming manual. Will it work? Enter 

200 LET F=F-W»RND(3) 
No, it will not work. What about line 450? 

IF S THEN GOSUB 600 
Entering this line yields no syntax error, 
so IF S THEN ... is a valid instruction. 
Translating all the random factors into 
8K Basic is an easy first step. 

POKEing Problems 

We will probably find other differences 
as we proceed, but for now, back to the 
original mystery. Is there something about 
these values that, altogether, they cannot 
be POKEd into the specified locations, or 
is it only that one particular location 
which cannot be POKEd to zero? Refer- 
ring to Listing 1, and counting the values 



listed in the article, we can see that the 
problem comes when we POKE 16437,0. 
So, with no program in the computer, do 
just that. After a couple of seconds, the 
screen goes blank and the keyboard has 
no effect. Why can't we POKE 16437,0 
on the ZX81 if Mr. Fox can on his ZX80? 

The answer has to do with the ROM. 
The ROM chip contains most of the infor- 
mation which allows the microprocessor 
to communicate with "the outside world" 
and vice versa. I say "most" because many 
ROM subroutines use RAM as a "scratch- 
pad." Therefore, certain locations must 
be left alone, or elso the computer will 
not behave properly. 16437 is one of them. 
If you have a listing of the ROM sub- 
routines, and you are really clever, you 
can use this glitch to make your computer 
do some surprising tricks. For examples, 
refer to any "Try This" program which 
contains a POKE statement. 

Are there any other "sacred cow" RAM 
locations? Probably. What are they? If 
you are curious, enter the program in 
Listing 3. Save it on tape before you run 
it. Running it must eventually cause the 
program to crash, because eventually you 
will POKE the memory locations which 
contain the program. Watch the screen 
for anything unusual. When it happens, 
BREAK the program and remember the 
last location displayed. LIST the program 
(if possible) to see if you have destroyed 
it. POKE the last location to with no 
program in the computer to see if it has 
the same effect. To try more locations, 
LOAD Listing 3 from tape and change 
the first value of X in line 10 to the next 
one after the location which caused the 
program to crash. Watch for particularly 
unusual responses from 16384 (whether 

73 



token, we can eliminate line 150 if we 
remember that the direction must always 
be either "F" or "R". Our abbreviation in 
line 130 makes that rather clear anyway. 
After all this abbreviation and contrac- 
tion of the program, we still run out of 

Listing 3. Finding the Sacred Cows 



IB FOR X>16390 TO 174B8 

20 PRINT X, 

38 PRINT PEEK X, 

4.8 POKE X,8 

58 NEXT X 



-Listing 4. Warp 81. 



18 LET o=i8aa 

28 LET O2=0 

38 LET F=100 

188 PRINT "URRP?" 

118 INPUT W 

288 LET F=F-U*RND*2 

218 LET U=tU/2) idRNDtS) t5) 

228 LET Dl=U*(U/2) 

2*8 LET D = D-[>1 

2S8 LET 5=0 

268 IF RND*6>5 THEN LET 5=216 

278 LET D2=DS+t>l 

298 CL5 

380 PRINT "URRP"."FUEL"..U..F,"Ue 

!_OC" . "DIST". V..t> 

320 PRINT 

380 PRINT TAB D2.-40. Jp' 

44.8 PRINT TfiB 20,CHR* S 

4S0 IF S THEN GOSUB 600 

460 IF F<1 THEN STOP 

478 IF D < 1 THEN GOTO 588 

488 GOTO 100 

500 PRINT .. "HOME" 

518 STOP 

688 IF U>7 THEN GOTO 668 

610 PRINT "RETREflT?" 

620 INPUT D* 

638 IF D*="N" THEN GOTO 660 

640 LIST f>=D+Dl 

645 LET F=F-U/2 

650 GOTO 678 

668 LET F=F-RND*U 

678 RETURN 



memory on line 650. Is there anything we 
can simplify? Look at the routine for 
drawing and positioning the spaceship. It 
takes up over 105 bytes in 11 lines!. If we 
can simplify this, it will be well worth- 
while. 

To begin with, let's take a look at the 
original ship. Enter line 1 and lines 40 
through 70. POKE in the numbers listed 
in the article and delete lines 40 through 
70. Now enter lines 330 and 370 through 
420. RUN this program. Apparently, 
either Mr. Fox has an unusual notion of 
what a spaceship should look like, or the 
numbers we POKEd into line 1 do not 
designate the same graphics characters 
on the ZX81 as on the ZX80. We must 
choose to change (and simplify) the space- 
ship, or to boldly go where no man has 
gone before in a John Deere wheat com- 
bine. If you do not think it looks like a 
combine, add these lines: 

430 PRINT AT 2,4; "Y" (graphics) 

440 PRINT AT 2,4; "T" (graphics) 

450 GOTO 430 

If you do not want to harvest at warp 
15, I can let you have a small economy- 
size flying saucer which was owned by a 
little old lady who flew it to Titan on 
Saturdays. It can be yours for only 13 
bytes. Delete line 1 and lines 330 through 
420. Enter a new line 330: 

PRINT TAB D2/40; "DGD" (graphics) 



Our spaceship is now smaller, requires 
much less memory, and looks more like a 
spaceship. Unfortunately, when we RUN 
the program, we run out of memory 
before we even see the spaceship. So we 
must simplify a little more. 

That memory-saving way to draw the 
spaceship gives me an idea. Why not use 
the same technique for the Killer Satel- 
lite? We cannot simply PRINT "**", 
because then we would see the Killer 
Satellite whether or not line 260 said it 
was there. We can, however, delete lines 
425 through 435, and change line 440 to 
read 

PRINT TAB 20; CHR$ S 

This gets us a little closer, but not 
enough. Perhaps we can simplify some- 
thing in the 600 subroutine. Let us look at 
what happens when we are asked 
"RETREAT?" If we answer "Y", then we 
retreat automatically. There is never any 
need to input "R" in line 140. Therefore, 
we can eliminate all references to D$ 
without affecting the game one bit. Delete 
lines 130, 140, and 230. 

The program still will not run so let's 
simplify a little more. Again in the 600 
subroutine, if we retreat, we lose a fixed 
number of fuel units (equal to our warp), 
but, if we charge past the Killer Satellite, 
the computer uses a rather complex 
formula to determine how much fuel we 



BART TRUEHEART, WHERE ARE YOU? 

In the Space Opera series games you are Bart Trueheart. the greatest genius hero of Earth With your companions, the Kindly Old Professor (KOP) and his 
Beautiful Young Daughter (BYD) you travel the spaceways in your faithful ship, The Rover of Space 

But this idyll cannot last . . . you have enemies The cunning Little Green Men (LGM's) of By-Orl and the brutish Bug Eye Monsters (BEM's) of Milkorf have 
joined forces to form THE MALTRAXIAN ALLIANCE 

Earth is depending on you to thwart their evil plans. 

S01 : THE MALTRAXIANS ATTACK 

You. as Bart Trueheart. must stop the fleet of the Maitraxian Alliance before it can concentrate and attack Earth Time is limited and so are your resources 
You have only your faithful ship, The Rover of Space and whatever you can capture from the enemy. 

CAN YOU SAVE THE EARTH? 
Ten levels of play 

$9 50 

S02 RAID ON COLONY ALPHA 

BEM's have entered the life support dome of Earth s first interstellar colony You, Captain Trueheart, must lead the few space marines stationed on Alpha. If 
the invaders are not repelled. Earth s colonization programme will end 

Fighting under the dome, you must clear the colony of invaders but be careful, it the dome is pierced no one will survive. 

$9 50 

"ADVENTURE" STYLE GAMES: 
SOA1 DETENTION STATION INTRAG 

The professor's Beautiful Young Daughter has been captured by the Maltraxians and imprisoned in the dreaded Detention Station Intrag- 
You must enter this orbital prison, find BYD and free her Then, most difficult of all, you must escape with her from the alerted station 
This is no task for the fainthearted; only you, Bart Trueheart, could even consider such a dangerous rescue 

CAN EVEN BART TRUEHEART SUCCEED? 
$13.95 

SOA2 ESCAPE FROM THE DARK SYSTEM 

You, Bart Trueheart, along with the Kindly Old Professor and his Beautiful Young Daughter have been marooned m a space-lifeboat in the fearsome Dark 
System 

Your only hope is to boldly land where no man has landed before on Nekros. a LGM colony planet and to steal one of their starships 

You must evade surveillance satellites, police, security and military forces while finding a ship to take you home There is little chance of success but what 
else can you do? 

$13.95 

All games are tor ZX81 16KRAM 

All games include cassette instructions and designer's notes. 

Add 70% for postage and handling 

Send cheque or money order to: 

TURNER, ELCY & COM., 
P.O. Box 395 
Port Huron, Ml 



76 



SYNC Magazine 




MAKE YOUR SINCLAIR 
A PORTABLE COMPUTER SYSTEM 

MAC (MOHR & Associates Corporation) Now Of- 
fers You A Durable. High Impact ABS Plastic Brief- 
case That Measures 1 7 1 2" X 1 2 1 4" X 4V 2 ". Wired For 
1 10-60HZ And Ready To Be Used! 
You Merely Insert Your Sinclair Components (In- 
cluding Printer) In the Preformed Cavities And 
BINGO You Have A Portable Computer System. 
The Briefcase Has Slots For Tapes, Coax Cable 
And The TV Adapter. 

$149.95 Includes Shipping & Handling. 

Kansas Residents add 3% Sales Tax. 

TO ORDER 

SEND CHECK OR MONEY ORDER 

MOHR & ASSOCIATES CORP. 

645 N. Baltimore 

Derby, KS 67037 

(316)788-1526/788-3165 

MC/VISA ACCEPTED 



THE EXPLORER'S 

GUIDE TO THE 

ZX81 

If you have ZX81 then you need this 
book (120 Pages). 

1 K and 1 6K Programs. 
Games and Application. 
RAM and I/O Circuits. 
Programming Hints 
ROM Routines. 

$11 from: 

TIME DATA 
3 - Waldon Road 
Califon, N.J. 07830 



Enclosed 

Name 

Address . 
City 



Check/M.O. 



State 



Zip 



ANALYSIS 

STOCK SELECTION GUIDANCE 

Now Available! Fundamental Stock Analysis 

Mo HOCUS FOCUS Charting Involved! Ho requirement to update lata 
dally, weekly or even monthly! With ANALYSIS end your UK II- 
Bl/TS-1000 you can make sound IUY/HOLD/5ELL Investment decisions 
at your convenience. ANALYSIS uses Information readily avail- 
able In your newspaper and at your local library. ANALYSIS and 
your ZX-81/TS-1000 provide you with • decision support tool 
equivalent to those used by professional Investment advisors. 

Fundamental Analysis centers about the premise that a 
security's price performance la dependent upon Its eipccted fu- 
ture earnings growth. ANALYSIS project* compounded earnings 
growth baaed on historical data using UNT-AJt UCR.ESS10K tech- 
niques. A security'* present price 1* compared to price range* 
based on projected earnings. An Upward/Downward movement ratio 
aa well a* • BUY/HOLD.'' SELL recommendation 1* provided aa out- 
put. 

YOL CANNOT AFFORD TO BE WITHOUT THIS TOOL! (Tape and 
Tutorial 5:7.95). 



software by 









Are you ready to kick 
the arcade game habit? 

Are you frustrated by 
adventure games that 
wear you out just 
entering your moves? 
THEN TRY THIS ONE! ! 



PORTFOLIO 

Investment Portfolio 



Performance Analyst, 



File Management Capabilities with your ZX-S1/TS-1000 (16K) 

P0KTFCLI0 provide. • powerful cool that transform, your ioK ZX- 
al/TS-]0O0 Into a eopM.tlc.ted Inveetaont Data beak . Tteck 
etocke, booda. autual fundi. Maintain accurate record, of t 
eharee, coat, and aat aelllng price targete. Track, ap to 50 
oocurlttoe. KEKU-drlven record aaneieaent cepebllltlee to ADC. 
CHANCE, DELETE or DISPLAY aelected recerde. Automatical It llet 
the entire file, one record et a Ilea, viewing tableau, of 
oocurlty attrlbutaa Including value, coat and percentage gain. 
HENU-drlven file aenagement cepebllltleo allow you to Input cur- 
rent aarket priced and recalculate overall portfolio perforaance 
and individual eecurlty perforaance ee well, gevo end Reetore 
file content, to end froa ceeeette. 

A MUST for env ZX-Sl/TS-1000 owner who aelntelne aa loeeot- 
aent portfolio. (Tape end Tutorial US. "11 

tend check , earner order to: 

ORIONS'S BELT Eaterprleao 
•07 M. rolrwey toed 
Clenolda, PA tv03o 

(Add (1.00 poetege end handling) 



You are the STAR HUNTER . You are the 
only one who can prevent a galactic disaster. 
You've been hired to find an artifact of 
fantastic importance. The fate of an entire 
interstellar empire depends on your success 
or failure. You must traverse many locations 
on several worlds, each in a different star 
system. You are alone and you start out 
unarmed. On top of all of this, your star- 
jumps are accomplished with matter-transfer 
booths — a most unreliable and therefore 
dangerous method of travel. The odds against 
survival and/or success are rather high. 

This adventure requires 16K RAM/8KR0M 
and can be loaded into the ZX-81 or the 
TIMEX SINCLAIR 1000. 

STAR HUNTER is both easy and fast to 
play, but it does require the use of your 

other computer THE ONE YOU CARRY AROUND 

BETWEEN YOUR EARS ! ! ! 



Star Hunter 



Is different- 
•It plays fast 
•Its user friendly 
• Its all in basic 
And its only $9.95 



Send $9.95 per tape to: 
Zebra X-Ray Software 
Box 585 

Chattanooga.Tn. 37401 



lose. This formula should be random to 
keep the game adventurous; there must 
be a chance of coming out ahead by 
daring. But it really does not have to be 
so complicated. Change line 660 to read 

LET F=F-RND*W 
Now the fuel taken by the Killer Satellite 
depends on how fast we are going, and on 



UBRP 

5 

UELOC 

32.358513 



FUEL. 

56.9B588* 
DIST 
-10.235381 



how lucky we are. However, since RND 
is always less than 1, we will always come 
out ahead by daring. Where is the thrill in 
a sure thing? Change line 645 to read 

LET F=F-W/2 
Now it is a toss-up whether retreating will 
be better or not. 

Try to RUN the program now. We are 
making progress, but we are not finished 
yet. Take a look at line 280. What good is 



it? It ensures that our "Status Report" 
will never indicate that we have passed 
home base. Line 470 will stop the game if 
we pass home base. If it is a choice be- 
tween not playing the game and seeing a 
negative distance, I will just delete line 
280. 

Halleluiah! It works! 

Now play the game a few times, How 
many did you win? None? Why not? Even 
without Killer Satellites in the program, 
you always run out of fuel. This goes 
back to the differences in the way random 
factors are handled in the 4K and the 8K 
machines. We could change line 30 to 
give ourselves more fuel, but 100 is nice 
to use. The other solution is to change 
line 200 to change the rate of fuel con- 
sumption. If it reads 

LET F=F-W*RND»2 
we have a game which is not only play- 
able, but winnable. 

Conclusion 

Many of the lessons we have learned 
here are applicable to other programs, 
too. Any short program you find in a 
book or magazine, whether for the ZX80 
or any other small computer, can usually 
be translated into 8K Basic. Watch for 
integer Basics (4K Basic is one) where all 
fractional numbers are rounded off. 

Watch for PRINT AT, PRINT TAB. 



and PLOT statements. They will never be 
the same on two different computers. 
However, they can be used if you know 
where they should be on the screen and if 
you use the appropriate values for the 
ZX81. 

When you have to shorten a program, 
which will be often, follow the same gen- 
eral procedure we used here. Be sus- 
picious of long mathematical formulas 
and long program lines. Try to figure out 
why the person who originally wrote the 
program used each line, and you may 
find a shorter way to do it. « B 

From "Space Warp" by Armando Fox 

(SYNC 2:3) 

This program runs in IK. but it must be 
entered in two parts. The first part is the 
"set variables" section shown in Listing 1. 
Enter this short program and RUN. Enter 
the following values to be POKEd to the 
REM statement in line 1:0,3, 10,0.0.132, 
128, 150. 139. 10,0. 132.3. 133. 6. Then hit 
LIST. Line 1 will look like a jumble of 
graphics symbols: these draw the ship. 
Now delete lines 40 through 70 (not 1 
through 30) and continue by entering the 
main program in Listing 2. To run the 
program, simply type RUN; since the 
graphics are stored as a REM statement, 
there is not much that can cause these 
variables to be cleared, except for NEW. 



INCREASE YOUR 

ZX81 PROGRAMS 

WITH INFINITY 

4 K or more 

BOUNCY Entrapped by the mad scientist. Count Von 
Der Bouncy, it is up to you to fight oft his bizarre 
creations known as snogel balls and try to regain 
your freedom 

$7.95' 

NIGHT DRIVER Test your driving skills on a desert 
road Through difficult turns and blinding curves, 
find out how good you really are. 

$7.95' 

CASINO/STOCKMARKET Now you can play the slot 
machines, keno. roulette, blackjack, and more right 
in your own living room/then see how well you can 
deal in the stock market. Be a millionaire in one night 

$9.95' 

MISSILE STRIKE Defend against enemy missiles & 
satellites seeking to destroy innocent cities You are the 
commander of a land-based missile defence center 
The fate of the world lies in your hands 

$7.95* 

'(All orders should include $1 for postage and handling. Out 
of the U.S., include $2 for postage and handling.) 

California residents, please add 614% sales tax. 

Infinity Research Development 

845 Via de la Paz, Suite A120 
Los Angeles. Ca. 90272 



IMft 



FREE X M A S GIFT 
TO Z X / T S USERS 
SEND STAMPED & 
SELF-ADRESSED 
ENVELOPE TO: 
UGSEE (Dept C) 
P B 1 5 5 
VICKSBURG 
MICH 49097 



78 



SYNC Magazine 



Get the most from your SINCLAIR 

with these practical, program-filled books from Syncl 




TheZX81 Companion 

by Bob Maunder 

The ZX81 Companion follows the same 
format as the very popular ZX80 
Companion, and assists the ZX81 user 
in four applications areas: graphics, 
information retrieval, education and 
games. This practical guide contains 
scores of fully documented short rou- 
tines plus complete programs and a dis- 
assembled listing of the ZX81 ROM 
Monitor. "Thoughtfully written, detailed, 
and illustrated with meaningful pro- 
grams."— MUSE 
5V2"x8", 132 pages. #17P $9.95 ($2.00) 




Getting 
Acquainted 
With Your 

ZX81 

Third Edition 
More than 80 Programs 




by Tim HartntU 
CrMLive Computing Pr**s 




Getting Acquainted With 
YourZX81 

by Tim Hartnell 

This informative volume for the new 
ZX81 user contains more than 70 pro- 
grams to help the reader get the most 
from his Sinclair computer. Game 
programs include Checkers, Alien 
Imploders, Blastermind, Moon Lander, 
Breakout, Star Burst and Derby Day. The 
book also shows programs for cascad- 
ing sine waves, plotting graphs and 
tables, data sorting, equation solving, 
plus the use of PLOT SCROLL, PRINT 
TAB, PEEK, POKE and much more! 
5V2"x8", 120 pages. #15Y $9.95 ($2.00) 



The Gateway Guide to the 
ZX81 and ZX80 

by Mark Charlton 

The Gateway Guide is a practical pro- 
gramming manual for the beginner that 
furnishes over 70 fully documented pro- 
grams. The majority of the programs 
have been written for easy conversion 
from machine to machine (ZX81, 4K 
ZX80 or 1 K ZX80). The Gateway Guide 
describes each function and statement, 
illustrates it with a demonstration rou- 
tine or program, and combines it with 
previously discussed material to help 
you understand your computer. 
5V2"x8", 172 pages. #160 $9.95 ($2.00) 



Computers for Kids (Sinclair Edition) by Sally Larsen 

This new edition of Computers for Kids is written specifically to introduce 
children aged 8 to 13 to the ZX81. The book requires no previous knowl- 
edge of algebra, variables or computers, and it enables a youngster to 
program a ZX81 in less than an hour. There's also a section for parents 
and teachers. "Computers for Kids is the best material available for 
introducing students to their new computer." 

—Donald T Piele, Professor of Mathematics, 
University of Wisconsin-Parkside. 
BWxtl", 56 pages. #12S $4.95 ($1.00) 

All volumes are softbound. 



r 



Creative Computing Press Dept. NA7F, 39 East Hanover Ave., Morris Plains, N J 07950 



1 



Please send books listed below: 



Item No. 


Qty. 


Price Each 


(P&H) 


Total Price 










































Postage and handling charges appear 
m parentheses ( ) next to prtce of 
book 







□ ENCLOSED IS $ NJ residents add 5% sales tax. 

□ CHARGE MY: □ American Express □ Visa □ MasterCard 



Card No 

Signature- 
Print Name- 
Address 



. Exp. Date_ 



| Miip 



Outside U S A add S3 00 per order- 
shipped airmail only. 



City/State/Zip 

□ Check here for FREE Creative Computing Catalog. 
For faster service, PHONE TOLL FREE: 800-631-8112 
(In NJ only: 201-540-0445) 
Please refer to Dept. 0000 when ordering. 



J 



8KR0M 
16KRAM 



Renumbering 
Basic Statements 

Allen H. Wolach 



Many versions of Basic have a Re- 
number utility. This is used to renumber 
Basic statements starting at a specified 
statement and spacing statements with a 
given increment between the statements. 
For example, if the starting number is 4 
and the increment is 7, the lines in the 
Basic program would go: 4, 11, 18, 25, 
32, etc. Most programmers start their 
programs at statement 10 and use incre- 
ments of 10. 

The advantages to a Renumber utility 
should be readily apparent. Sometimes a 
programmer uses all of the numbers be- 
tween two Basic statements while modi- 
fying a program. A Renumber utility 
can be used to place unused statement 
numbers between all statements. A com- 
pleted program is also more attractive if 
all of the statements are spaced at con- 
stant increments. 

A Sinclair Basic Renumber Program 

This article presents two Basic renum- 
bering programs in Sinclair Basic for the 
8K ROM. The program in Program 1 is 
a short program that can be used with 
IK or 16K RAM. This program only re- 
numbers the Basic statements. It does 
not do anything about the destination 
addresses for GOSUB and GOTO 
keywords that must be changed after a 
program is renumbered. 

The program in Program 2 is a longer 
program that also calculates the destina- 
tion address for each GOTO and 
GOSUB statement. 

How to Use the Program 

The user must select one of the two 
programs and enter it on a cassette tape. 
Whenever the user decides to work on a 
new program, he first enters the renum- 
ber program into his computer. During 
the stages of program development the 
renumber program can be saved on cas- 
sette along with the user's program. The 
renumber programs occupy consecutive 

Allen H. Wolach. Department of Psychology, 
Illinois Institute of Technology, Chicago, IL 
60616. 



high statement numbers (9981 through 
9999 for Program 1 and 9938 for Pro- 
gram 2). This leaves almost all possible 
Basic statement numbers for the pro- 
gram that is being developed. 

The variables in the renumber pro- 
gram were selected so that it would be 
very unlikely that the user would have 
the same variable names in the program 
that he is developing. 

When the programmer decides to re- 
number the program, he enters GOTO 
9982 (shorter program) or GOTO 9939 
(longer program). Both programs 
prompt the user for the new starting 
statement of the user program and the 
increment between Basic statements. 
The user can choose any number from 1 
to 255 for the starting number and for 
the increment between statements. After 
these numbers are entered, both pro- 
grams renumber the user's program. If 
the longer renumber program is used, 
the program prints out a series of state- 
ments such as 
25 GOTO 50 
30 GOSUB 5 
40 GOTO * 

The user must edit statement 25 in the 
renumbered program so that the number 
after GOTO is changed to 50. Statement 
30 must be edited so that 5 occurs after 
the GOSUB. The * in statement 40 indi- 
cates that the GOTO in statement 40 
was not followed by a number or that 
the original number did not start imme- 
diately after the GOTO. Note that the 
renumber program is written so that it 
does not get renumbered while the users 
program is renumbered. In fact, any 
statement number above 8959 will not 
be renumbered. 

After a program is completed and re- 
numbered, the renumber program can 
be deleted statement by statement. Once 
the renumber program is deleted, a mod- 
ified program cannot be renumbered by 
the renumber program unless the user is 
willing to reinsert the renumber pro- 
gram by hand. 



How Program 1 Works 

Sinclair computers with the 8K ROM 
start storing Basic statements at memory 
location 16509. Each stored statement 
starts with two bytes that contain the 
number of the Basic statement. The first 
of these two bytes, byte 16509 for the 
first Basic statement, contains the low 
portion of the statement number. Sup- 
pose that one has a Basic program in the 
computer. The command 

PRINT PEEK 16509*256+PEEK 
16510 

would print the decimal equivalent of 
the first statement number. 

The second two bytes in a program 
statement, 16511 and 16512 for the first 
program statement, contain a number 
that is the length of the Basic statement 
including the ENTER that occurred at 
the end of the statement. These two 
bytes have the high portion of the num- 
ber in the higher byte (16512 for the first 
Basic statement) and the lower portion 
of the number in the lower byte (1651 1 
for the first Basic statement). 

Suppose that the variable III contains 
the address of the first (high) byte of a 
Basic statement (e.g., 16509). Location 



Program 1. Renumber (IK). 

9981 STOP 

9aas let jjj=b 

9983 PRINT "ENTER STORTING NUrlBC 

R" 

•3984. INPUT GGG 

9985 PRINT "ENTER INCREMENT" 

9988 INPUT FFF 

3987 LET 111=16589 

9988 GOSUB 9991 

9939 LET III=III+PEEK (111*2) +PE 

EK (XXX+3) »256+* 

9990 GOTO 9988 

9991 IF PEEK II6>3+ THEN STOP 

9992 IF GGGOS6 THEN GOTO 9995 

9993 LET JJJ-JJJ+1 
9994. LET GGG=GGG-S56 

9995 POKE III^JJJ 

9996 POKE (III+D.GGG 

9997 LET GGG=GGG+FFF 

9998 RETURN 

9999 STOP 



III = 1 contains the second byte of the 
statement number. Numbers III = 2 
and III = 3 are equal to the locations of 
the low and high bytes of the number of 
bytes in the statement. If III is set to the 
location of the high byte of a statement 
number, the high byte of the next state- 
ment number has to be 

PEEK (III + 2) + PEEK (III + 3) 
*256 + 4 
That is, 

PEEK (III + 2) + PEEK (III + 3)*256 
is equal to the length of the current Ba- 
sic statement including ENTER. The 4 
is the sum of the two bytes occupied by 
the statement number and the two bytes 
that indicate the statement length. The 
statement 

LET III = III + PEEK(III + 2) + 
PEEK(III + 3)*256+4 
can be used to increment III to the ad- 
dress of the first byte of the statement 



80 



SYNC Magazine 



New! 



AIR TRAFFIC CONTROL 

Cassette software for your 1 6K 

ZX81orTS1000 



Meet the challenge of up to 24 aircraft speeding 
across your screen to 5 different destinations! 

No "safe" altitudes ■ every plane is your responsibil- 
ity. You must identify type, heading and altitude and 
skillfully guide them through crowded airspace, while 
a real-time clock builds the pressure. 

Every game is different. 
Aircraft, ranging from a Cessna 152 to 
the new Boeing 767, enter your airspace 
whether you are ready or not. 

Over 3K of machine code means immediate re- 
sponse. Experience the tension as you race to avoid 
the controller's nightmare - a mid-air collision! 

Order AIR TRAFFIC CONTROL from: 
Powerplay Systems 
P.O. Box 752, Woodside 
New York, NY 11377 

Send $12.95 plus $1 .50 s&h (NY res. add sales tax). 
Allow 3-4 weeks for delivery. 



For 2X80/1X81 with 8K RDM and 16K RAM 

i&oyy 
mot 

AN ANAGRAM-, CROSSWORD- TYPE GAME, 1 to 6 PLAYERS 

• In home oi clanfLOom BON MOT make* learning f,an 

and j(un educational. 

t . . vitopi vocabulary and ApzLLing ikitlt, 

9 Choo&e iJiom M diiiexent iized "gome board*" to 
control the length o^ tach 

• Competitor*' challenge* cau*e player* to u*e a 

dxctionarij f,or verification* and de^inijUon* 

• Rule* and ptay<ng tcp* on rever*e Aide. o& ca**ette 

• An exciting game reqw ion finger dexterity 

Only $9.99 each. 5 or more only $7.00 each. 

(Pennsylvania customers add tX Sales Tax. If mailed 
outside the United States please add 10% for shipping.) 

Send check and old. 

GOTKALD, Box 404, DA\ I RS\ I ILE, PA 15928 

: : copies of BOW HOT to: 

Name 

Address 



LOAD EASIER 



THE MICROCOMPUTER USER'S 
BOOK OF TAPE RECORDING 
($5.80), 

a comprehensive, easy-to-use mine 
of information on how to solve tape 
problems. 

TEST AND ALIGNMENT 
CASSETTE ($9.80), 

which has test signals and 
instructions on how to set up your 
recorder's head, and how to check 
the speed. 

THE HILDERBAY LOADING AID 
($11.90), 

a simple-to-use device which lets 
you get the volume setting right first 
time: if a tape will load at all, you will 
be able to load it first time. 

Send check or International Money 
Order to: 



Hilderbay Ltd. 
8/10 Parkway 
Regents Park 
London NW1 7AA 
U.K. 



Name 



Address 
City 



State/Zip 



number of the next Basic statement. 

Suppose that one has a decimal num- 
ber that is less than 255. This number 
can be added to the low byte of a state- 
ment number. The computer contains a 
number between and 255 in this byte. 
If the sum of these numbers is greater 
than 255, a 1 must be added to the high 
byte of the statement number. State- 
ments 9991 through 9998 in Program 1 
are a subroutine that adds the increment 
(interval between Basic statements) to 
what was the number of the last renum- 
bered statement. Assume GGG contains 
the new statement number for a state- 
ment that is being renumbered. State- 
ment 9992 tests to determine if the num- 
ber is less than 256. If it is less than 256, 
control passes to statement 9955 which 
pokes into the high byte of the state- 
ment number because JJJ was set to in 
statement 9982. Then statement 9996 
pokes the new statement number in the 
low byte of the statement number in 
GGG by the appropriate increment, FFF. 
Then the main program is reentered 
(statement 9998) as statement 9984. 

If the current statement number is 
greater than 256, JJJ, the high byte of 
the statement number, is corrected in 
statement 9994. That is, the low byte of 
the statement must have 256 subtracted 
to account for the 1 that was added to 
the high byte. Statements 9995 and 9996 
POKE in the new high and low bytes for 
the statement number. Statement 9997 
increments the statement number and 
statement 9998 returns control to the 
main program. 

Statements 9983 through 9986 in Pro- 
gram 1 request and input the starting 
number and increment for the renumber 
program. Statement 9987 sets III to the 
address of the high byte of the first state- 
ment number. Statement 9998 transfers 
control to the subroutine that POKEs in 
the new statement number. When the 
main program is later reentered, state- 
ment 9989 increments III to the address 
of the high byte of the next statement 
number. 

Statement 9988 returns the program 
to statement 9988 so that the next state- 
ment can be renumbered. Every time the 
subroutine for incrementing the state- 
ment number is entered, statement 999 1 
checks to determine if the current high 
byte of a statement number is greater 
than 34. If this number is greater than 
34, the program stops, insuring that the 
renumber program will not be 
renumbered. 

How Program 2 Works 

Statements 9940 through 9944 request 
and input the starting number, GGG, 
and the increment, FFF. Statements 
9944 through 9946 provide a heading for 
the GOTO and GOSUB statements that 

82 



will be listed. Variable III is set to 
16513, the beginning of the first Basic 
statement, in statement 9947. 

Statement 9948 determines if one has 
reached the end of a Basic statement. 
The number 118 is the Sinclair code for 
the ENTER that terminates each Basic 
statement. If the end of a statement has 
not been reached, statements 9952 and 

9953 determine if III is pointing to a 
GOTO (236) or a GOSUB (237) code. 
The variable HHH is set to 1 for a 
GOTO or 2 for a GOSUB code in state- 
ments 9952 and 9953. The variable 
HHH remains a (set in statement 
9939) if III is not pointing to a GOTO 
or a GOSUB code. 

Statement 9954 checks to determine if 
III is set to the code (126) that indicates 
a five byte binary number is to follow. If 
a binary number follows in the Basic 
program listing sequence, statement 

9954 increments III to the address of the 
first byte after the binary number. That 
is, statement 9954 adds 5 to III and 
statement 9956 adds an additional 1 to 
make a total of 6. The binary number 
plus the 126 code takes a total of six 
bytes in the Basic statement. A binary 
number can contain 126, 236, or 237 in 
any or all of the five locations occupied 
by the binary number. These numbers 
must not be interpreted as a GOTO, 
GOSUB, or the beginning of a number 
code. 

Statement 9955 transfers control to 
statement 9958 if a GOTO or GOSUB 
code is encountered. If a GOTO or 
GOSUB code is not reached, III is incre- 
mented by 1 to the next byte (statement 
9956) and control is returned to state- 
ment 9948 to check the next memory lo- 
cation. When an ENTER code is finally 
detected in statement 9948, the next byte 
in the Basic sequence is checked (state- 



ment 9949) to determine if the last pro- 
gram statement is renumbered. That is, 
III is set to the first byte of a statement 
number. If this byte is greater than 34, 
the statement number is above 8959 and 
is not renumbered. 

Statement 9950 increments MMM 
which was set equal to the starting num- 
ber for the Basic program in statement 
9942. Every time statement 9950 is en- 
countered, MMM is incremented by 
FFF which contains the increment num- 
ber for the renumber program. Since 
statements 9948 and 9949 are only en- 
countered when III is set to the address 
of ENTER (118) at the end of a state- 
ment, statement 9951 is used to incre- 
ment III to the next Basic keyword. 
That is, the next statement number ad- 
dress and the two bytes containing the 
length of the next Basic statement are 
skipped. 

Statement 9958 prints out the renum- 
bered statement number of a GOTO or 
GOSUB statement. The word GOTO 
(statement 9959) or the word GOSUB 
(statement 9960) is printed by statement 
9958 or statement 9959. Remember that 
HHH is 1 for a GOTO statement 9961. 
Statements 9958 through 9961 cannot be 
encountered unless III points to the ad- 
dress of a GOTO or a GOSUB code in 
the Basic statement. 

The numbers that a user enters after a 
GOTO or GOSUB keyword are coded 
by the Sinclair ROM as a number be- 
tween 28 and 37. That is, is 28, 1 is 
29 ... 9 is 37. A GOTO or GOSUB 
code need not be followed by a number. 
An expression such as (A * B) could 
have been entered after the GOTO or 
GOSUB. Statement 9962 checks to de- 
termine if a number follows the GOTO 
or GOSUB code. If a number does not 
follow the GOTO or GOSUB code, an 



Program 2. Renumber with GOTO and GOSUB Destinations. 



9938 STOP 

9939 LET HHH=0 

394.0 PRINT "ENTER STARTING NUMBE. 

R" 

99*1 INPUT GGG 

9942 LET HMM-GGG 

99*3 PRINT "ENTER INCREMENT" 

39** INPUT FFF 

9945 PRINT "REINSERT THESE STRTE 

~IENTS" 

99*6 PRINT 

99*7 LET 111=16513 

99*6 IF PEEK III <> 118 THEN GOTO 

3952 

99*9 IF PEEK (III+l) >3* THEN GOT 

O 9)986 

9950 LET MMM=MMM+FFF 

9951 LET 111=111+5 

9952 IF PEEK 111=236 THEN LET HK 
H = l 

9953 IF PEEK 111=237 THEN LET HH 
H=2 

995* IF PEEK 111=126 THEN LET II 
1=111+5 

9955 IF HHH>0 THEN GOSUB 9956 

9956 LET 111=111+1 

9957 GOTO 99*8 

9958 PRINT MMM; 

9959 IF HHH=1 THEN PRINT " GOTO 



9960 IF HHH=2 THEN PRINT 



GOSUR 



9961 LET HHH=0 

9962 IF PEEK (III+l) >27 RND PEEK 
(III+l) <38 THEN GOTO 9965 

9963 PRINT " # " 

9964 RETURN 

9965 LET JJJ=2 

9956 IF PEEK ( III+JJJ) =126 THEN 

GOTO 9970 



9967 LET JJJ=JJJH 

9968 IF JJJ>5 THEN GOTO 9963 

9969 GOTO 9966 

9970 LET LLL=1 

9971 LET KKK=0 

■3978 LET KKK =KKK + t PEEK (III+JJJ- 

1) -28) fLLL 

9973 LET JJJ=JJJ-1 

997* IF PEEK ( IlltJJ J-l) =236 OR 

PEEK (IIItJJJ-1) =237 THEN GOTO 9 

3975 LET LLL=LLL*10 

9976 GOTO 9972 

9977 LET JJJ=16S09 
S978 LET NNN=0 

9979 IF PEEK JJJ+256+PEEK (JJJ + 3. 
I > =KKK THEN GOTO 9983 

9980 LET NNN=NNN+1 

9981 LET JJJ=JJJ+PEEK ( JJJ+2) +PE 
EK (JJJ+3) *2S6+* 

9932 GOTO 9979 

9933 LET KKK =GGG+NNN+FFF 
=•38* PRINT KKK 

9935 RETURN 

9986 LET JJJ=0 

9987 LET 111=16509 
3988 GOSUB 9991 

9939 LET III=III+PEEK (III+2)+PE 
EK (111*3) +256+4 

9990 GOTO 9988 

9991 IF PEEK III 134 THEN STOP 
3992 IF GGG<256 THEN GOTO 9995 

993 LET JJJ=JJJ*1 

999* LET GGG=GGG-256 

9995 POKE III. JJJ 

9990 POKE (III+l) , GGG 

3997 LET GGG=GGG+FFF 

T398 RETURN 

3 : 99 STHP 



SYNC Magazine 




Peak 



:in«tt« Soft««r« for tha 1X81 
and th« TlMx/Slnclalr 1000 



DATAPLOT 



A procrma to plot frtje fon«tt«d data itorM tn R£M stateaents. 
:rtwi and Labiai tha uti, tltlaa your plot and eonnacta your 
data, pointi. DATAPLOT •HI alto draw figure*, plot froa an 
aquation, and plot on a frld If nacaaaary. Plot atoek and 
natal prieae, Intaraat rmtaa, aclantlflc data, ate. with thla 
versatile profraa. 110 l6K 

TEXT and PRODIR 

Cur aoat popular profraa act. TEXT - A profraa for aaay text 
editing, etorage and display. Racall pa««i of raporta, lattara. 
itc without splitting words at tha and of a Una. PRODIS - 
A pro<raaad directory to organise prograaa and aaaa loading. 
310 l6r* 



BLACKJACK 



Practlca your strategy. Hit, stand, doubla down, split, and 
taice Insurance with thla Nevada caatno game. Daals out a 
complete dack bafora shuffling. $10 16K 



MATHFUN 



?lrat grade ™»th with creative graphics to halp your chlldran 
laarn and review while having fun. ?lve 2(C prograaa covering 
addition, subtraction, tlaa tailing; and aora . Developed by 
a certified tsachar. 120 2X .Jateh for our coaplate 
aducatlonal software Una to ba out soon. 

>1 discount If you ordar 2 progrea sata and request 
thea to ba put on ona taps. Prleaa lncluda shipping. 

5snd chack to our new Location. 



Peak 



f.C. Sd« S005 Suit. 231. 

Bould.r. SO 30106-8005 



•» Kg%B0ff3I>S 











|l 2hh 1 5 1 6 I 7 1 8 | 9 1 1 




QWERTYUIOP 




ASDFGHJKL return 


*hift| 1 |z|xIcIv|b|n|m|. |n«n| 






| 











VOL! NEED 



9U1 



JLL-SI ZED KEYBOARD. 
4Y F»«Y MORE*? 



Thia « nam, FULL -STROKE, S3 KEY, surplus, BOLD-CONTACT keyboard, 
originally *ada for a Taxii InstruiMsnta coaputar tarail nal . Coava-a 
with 6 Inch spaca bar, 2 ovsrilisd shift kayi, an ovaralzad 
raturn (mntmr) kay and 12 apara katya which can ba usad for tha 
spec l a 1 c 1 rcul ts dascr 1 bad b a- 1 om. An opt i ona 1 par t a kit la 
available with all tha alactronlc parts raqulrad. (IC'a with 
sockets, resistors, capacitors, LEDs, etc.) You provide only. 
Mire solder and a small place of perf-board for assembly. 

The keyboard cornea FULLY ASSEMBLER and ready to connect to your 
computer via a 13 conductor ribbon cable (supplied). The 

enpanalon connector Is left free for your use with printer, RAM, 
or other devices. 
The keyboard comes with full plane for the following circuits: 

ELECTRONIC SNlfT-LOCK KITH LED INDICATOR. 

(WTQ-RlPiaT N1TN LLP INDICATOR. One, activated this circuit 

mill a/Joe you to continuous! y input any kay Just by holding it 

down, Incl udas varimbl a spaad control . 

WTO-SHIFT fQR SELECTED FUNCTIONS. You dacida mhich shifted 

functions (lika * » •» comma dalatm ate.) you Mill placa on 

dadlcatad kays, to ba usmd N1TN0UT SHlfllMB. Tha parts kit 

contains enough parts to dadicata 10 kmys. 




residents please add a. 72 



POSTAGE 
ta aalea tax. 



BYNC SUBBCRIBERB INCLUDE MAILING LABEL FROM COVER 
AND DEDUCT #>^. 



PQW^iff HI ELECTRONICS 
19S LELANI 
rf*N ANTONIO, TX 78242 



Only U.S. DOLLARS CAN BE ACCEPTED. 
MONEY ORDERS PREFERRED. PERSONAL 
CHECKS MUST CLEAR BEFORE SHIPMENT. 



CASSETTES 

COMPUTER GRADE 

100% ERROR-FREE 

FULLY GUARANTEED 



v&*2 



c&* 



E*p* 



tees 




The Micro-Trac Generation 

• High Frequency Response • Wide Dynamic Range • 

• Used by Software Firms & Computer Hobbyists • 

• Choice of School Districts Nationwide • 



LENGTH 12-PAK 24- PAK 

C05 $ .69 $ .59 

C-10 $ .79 $ .69 

C-20 $ .99 $ .89 

C-30 $1.19 $1.09 

C-60 $1.49 $1.39 

C-90 $1 .79 $1 .69 

•CASES $ .21 $ .20 

'Cases recommended to protect sensitive cassettes. 



-UPS SHIPPING- 
(NoPO Boxes please) 
$2 00(12 pak) $3 00(24 pak) 
— Canadian shipping multiply by 2 

#1 COMPUTER TAPE 
IN THE USA! 

— write for volume prices — 



TOLL-FREE 

(orders only) 
1-800-528-6050 

ext. 3005 

In Arizona 
1-800-352-0458 

ext. 3005 

MICRO-80™|NC. 

2665 Buzby Road 

Oak Harbor, WA 98277 

—Distributors Wanted— 












PROGRAMS WANTED 




A5ERSDFT 




7 MAESAFALLEN, BOW ST, DYFED, SY24 5BA 






Do you have a program for the SINCLAIR 
ZX81orTIMEX1000? 




ZX81 & Spectrum 




Games 






MEMORY MASTER is now seeking new 
programs to add to our software line. 

If you have a quality program, suitable for 




Now NEW LOW prices!!!! 




PROGRAM PRICE 




Chess 1 4 $17.95 
10 levels m c 






sale in retail stores, we are interested. 




Adventure $17.95 
1 40 locations based on the original 






Royalties paid for programs we market. 




Invaders $8.95 
Fast m c arcade action 






Send name, address, phone and descrip- 
tion of program to: 




Mazeman $8.95 
All the features of the original 
arcade version m c 






Memory Master 
P.O. Box 774 
Barnegat, N.J. 08005 




Add $2.00 for postage/handling 










Dealer inquiries welcome. 


NEW STATE OF THE ART 








TS1000/ZX81 (16K) SOFTWARE 






NEW 


ENTIRELY MACHINE CODED 






From Intercomputer 


3D SPACE BATTLE. Incredible, super fast and complex 30 graphics. You are in 
the starfighter cockpit and the screen is your window over an unlimited Universe 
background. You see the Alien Starfighters coming and firing their Photon Beams to 
you. Destroy as many as you can with your Laser Gun while you have energy. See 
the Explosions, Laser Beams, Photon Beams. Alien Starfighters, all in full 3D. Full 8 
direction control with just 3 keys. 






A 
Full Line 

of 
Software 


LUNAR LANDER. The first real simulation of the well known arcade game for the 
TX1000/ZX81 computers. Two stages of resolution. Smooth motion of the Lunar 
Module. Selectable levels of gravity and inertia. Full graphics. 






SUPER-ZXCLOCK. Giant display up to lOnths of second. Mini-display up to 
100nths of second. 10 chronometers. Musical alarm. 






foryourZX81 or 


ORCHESTRA. The computer plays your favourite melodies without add-ons. 
You don't need to know how to play any instrument: just enter a sequence of note 
names and durations. Stores up to 3000 note melodies on tape. Full editing capa- 
bilities. User re-definable music notation. Perfectly tuned on A440. Allows sound 
over 3 octaves, with semitones and rests. Sounds through the TV speaker or an 
amplifier connected to the MIC output of the computer. Uses BASIC to set-up and 
edit sequence. 

ONLY $14.95 EACH (INCLUDING AIRMAIL). SEND CASH, 
CHEQUE OR MONEY ORDER PAYABLE TO JOSEPH-ORIOL 
TOMAS VISA & M/C ACCEPTED. PLEASE ALLOW UP TO 28 
DAYS FOR DELIVERY SPANISH VERSIONS ALSO AVAIL- 
ABLE. 






Timex Sinclair 1000 


Please send me a FREE 
Program and Catalog 

Name 


ATTENTION ZX SUPPLIERS: WE ARE INTERESTED IN AC- 
QUIRING LICENSING RIGHTS TO TRANSLATE & MARKET 
YOUR ZX SOFTWARE IN SPAIN (THIS IS ALSO THE BEST 
WAY TO PROTECT YOUR COPYRIGHT) WE ARE ALSO THE 
MAIN DISTRIBUTORS OF ZX HARDWARE AND BOOKS IN 
SPAIN. SAMPLES WELCOME 






Address 






WE ARE ALSO LOOKING FOR SOMEONE TO PRODUCE 
OUR SOFTWARE IN USA UNDER LICENSE AGREEMENT 
SEND YOUR OFFER. 

Joseph-Ork>! Tonus, Director 

VENT AM ATIC Micro-lnformatica 

Avda. de Rhode, n' J 253 

ROSES (Glrona) 

SPAIN 






Send this coupon to: 

Intercomputer 
Box 90 

Prudential Center 
Boston, MA 02199 



asterisk (statement 9963) is placed after 
the statement number and GOTO or 
GOSUB that are on the screen. Then 
control is returned to statement 9956 so 
that III can be incremented to the next 
location in the Basic sequence. 

If a number is located after GOTO or 
GOSUB, statement 9962 causes state- 
ment 9965 to be encountered. State- 
ments 9965 through 9968 start JJJ at 2 
and increment JJJ as successive memory 
addresses are checked to determine the 
length of the number. If the number is 
greater than 4, statement 9968 transfers 
control to statement 9963 to print an as- 
terisk after the GOTO or GOSUB on 
the television screen. The program as- 
sumes a valid number following a 
GOTO or GOSUB cannot be greater 
than 4 bytes long. 

After statement 9966 detects a byte 
containing 126 (the beginning of a bina- 
ry number), control is transferred to 
statement 9970. At this point III + JJJ 
points to the location after the number 
in the GOTO or GOSUB sequence. 
Statements 9970 and 9971 set LLL and 
KKK to 1 and 0, respectively. 

Statements 9972 through 9976 form a 
loop that changes the coded number of 



following GOTO or GOSUB into a deci 
mal number. The loop starts (statement 
9972) by examining the last coded digit 
in the number, and subtracting 28 from 
this coded number to make it into a deci- 
mal number. The number is multiplied 
by LLL which is started at 1. The vari- 
able JJJ is decremented by 1 in state- 
ment 9973. 

If the number was only one digit long 
or a 236 (GOTO) or 237 (GOSUB) code 
is detected in statement 9974, control is 
transferred to statement 9977. If the 
number is more than one digit long, the 
multiplier LLL is multiplied by 10 and 
statement 9976 transfers control to state- 
ment 9974. Statement 9974 decodes the 
second from the last digit of the number, 
multiplies it by LLL, which is now 10, 
and adds this number to the last digit of 
the number. The loop in statements 9972 
through 9975 is not completed until the 
entire number is decoded. 

Statement 9997 sets JJJ to 16509, the 
starting address of the Basic statements. 
The loop in statements 9979 through 
9982 looks at each Basic statement ad- 
dress and checks to determine if the ad- 
dress is greater than or equal to KKK 
which is the decoded old address of the 



current GOTO or GOSUB statement. 
After an address is checked, 1 is added 
to the variable NNN. 

When an address is encountered that 
is greater than KKK, NNN contains a 
number that equals the number of Basic 
statements before the statement that is 
the destination of the GOTO or GOSUB 
statement. 

Statement 9983 uses this formula: 
New destination address = New start- 
ing address + (number of Basic state- 
ments before the destination statement - 
1 ) * increment. This is used to calculate 
the new destination address for the 
GOTO or GOSUB statement in ques- 
tion. Statement 9984 prints the new des- 
tination address after the GOTO or 

Finally, statement 9985 returns con- 
trol to statement 9956 to repeat the pro- 
cess outlined above for the next Basic 
statement. When the last GOTO or 
GOSUB statement is listed, statement 
9949 transfers control to statement9986. 
Up to this point the original program 
has not been renumbered. Statements 
9989 through 9998 renumber the pro- 
gram in the same way that statements 
were renumbered in Program 1. In fact, 
statements 9987 through 9998 in Pro- 
gram 2 are identical to the statements 
with the same statement numbers in 
Program 1. ^ 



No- Limit 
Hi- Draw 



POKER 




Challenge any 5 (6-handed) of ten 
opponents; each plays differently. 

ZX81/TS1000 (16K) ZXP12C (Cassette) .. *1 6.95 
Postage & Handling '1.50 N.Y. Residents, add 7% sales tax 

Sddicatfy Sofftuuvu (ytmfuuuf 

P.O. BOX 2977 • SYRACUSE. NEW YORK 13220 



ROM 

DISASSEM6LED 



ZX-81 TIMEX-10BB 

8K ROM DISASSEMBLY LISTING. ..OVER IBB PACES MI 

This is not a manual or textbook... 

But much more than just a 'raw' disassembly. 

All major BASIC command routines (e.q. PAST, SCROLL, CLS) 
are LABELLED and CROSS-REFERENCED. We've added helpful 
comments in many cases. 

With this text as a reference you will be able to : 

* Reduce program length and RAM requirements by USR 
calls to ROM routines 

* Add machine code speed to your graphics without 
re-inventing the wheel for every routine 

* Load programs faster since the ROM routines are 
available at power-up 

* Work around, or with, the 'peculiarities' of the 
ZX-81. ..Display handl lng...Variables... Interrupts 



Send $19.95 plus $2.08 postage to: 



D A DATASYSTEMS 

229 Ravenwood Ave. Rochester, NY 14619 

716-328-3661 



November/December 1982 



85 



VORK lO 

BASF-DPS 

WORLD STANDARD TAPE 



MONEY BACK 
GUARANTEE 



PREMIUM 5-SCHEW 

SHELL FITS ALL 

STANDARD RECORDERS 



COMPUTER GRADE 
BLANK CASSETTES 



DATA TRAC / C-05, C-10, C-20 



CASSETTE STORAGE CADDY 



N6* 



ORGANIZE 
YOUR TAPESI I 

$2" EACH 



I 




FINEST OUAUTY 
PHILIPS (NOP.ELCO) 
TYPE HARD SOXES 



TRACTOR FEED 

DIE-CUT BLANK 

CASSETTE LABELS 



INTRODUCTORY OFFER! 

ORDER 2 DOZ. CASSETTES, ORDER 1 CADDY 

GET 1 CADDY FREE! fSSi!'lStf¥llS m 



4 



§: S c W 4 Y A ABOUT* OBK 



rely on 



USERS SAY """"^tput to lt>» 

vve^^sp^^o 
compu ter .7 ol . n dabsowW •• 

i^&fesSp." 






drop 



vgL 



Stac« 



^"iroR »"<* !on 



OH 




Beaverto" 

Call: 213/710-1430 



"yOUVE TB/ED THE BEST, 
NOW BUY THE BEST" 



for IMMEDIATE SHIPMENT 
on Credit Card Order*. 




ORDER NOW . . . VORK lO Computer worT 

MAIL TO: 24573 Kittndge St , #A3 , Canoga Park. CA 91307 
■ s» s> ea> ORDER FORM - — — — asaj — — 



ITEM 1 DOZEN 2 DOZEN 


TOTAL 


C-05 ] 7SO Q 13 50 




c-io j eoo M4o 




C-20 □10 00 □ 18 00 




Hard Bo» 2 2 50 ] 4 00 




Storaae Caody r<& 5.2 95 «a Oimntity 
FREE Quantity 




Blank labels □ 4 00/100 □ 3° 00/1000 




SUB TOTAL 




Calit residents add 6% sales tax 




Shipping/handling 1 do* S2. 2 doz S3 50 
3 do; $4 SO. each additional do; S 50 




For Parcel Pcet instead ol UPS ADD $1 




Outside Continental USA. ADD $2 




TOTAL 




Check or MO Charge to 

enclosed Q Credit Card: Q VISA Q MASTERCARD 

D PLEASE SEND QUANTITY DISCOUNTS 



Each cassette 
includes two YORK 
10 labels only 
Boxes are sold 
separately Ship- 
ments are by 
UPS unless 
Parcel Post re- 
quested Boxes, 
caddies and blank 
labels are free of 
shipping charges 
when ordered with 
cassettes When 
ordered without 
cassettes, shipping 
charges Boxes- 
Si 00; do; . 
Caddies $1 00 
each MINIMUM 
SHIPPING/ 
HANDLING ON 
ANY ORDER- 
$2 00 



Card No. 




Exp. 


Name 


Address 


City 


State/Zip 




Signature 


Computer make & model 




Disk?fv/nl 





If you own a ZX81 

or a TIMEX1000 

then you need the 

ABACUS CONTROLLER 



Developed to 
eliminate tedious 
swapping of plugs 
when LOADING or 
SAVING programs 
on cassette. 

One switch 
operation allows 
selection of TALK, 
SAVE, CUE and 
LOAD modes. Using 
a built-in 

microphone/speaker 
to allow fast and 
reliable program 
naming and cueing. 

Price $24.95 inc. 



Now available - AVENGER - an 
Arcade style, machine code game 
for the 16k ZX81 written by the real 
Kevin Flynn. Guaranteed the best 
there is. 
Price $9.95 inc. 




m 



.electronics- 



1 86 St. Helens Avenue 
Swansea. West Glam. 
Great Britain 
tel: 0792 50282 



PORTABIC COMPUTCft POW€R 




Protect your Sinclair in o portable, dust free work station, 
txtra storage space for 6 tapes, connecting cables, power 
and ram pack. 

Removable lid allows in-case operation. 
Non-skid feet prevent desk top scratches. 
Absolutely the most efficient and convenient way to 
protect, store, and transport your computer system. 
Only $54.95 in continental U.S.ft 

Dealer Inquiries Welcome 

CflSCS INC. P.O. Box 33820 Seattle. UUfl 98133 (206) 365-5210 
VISA MflST€RCARD 



Your Timex/Sinclair 
Can Become a Terminal 



V. B. Rice 



Introduction 

The number and variety of "on-line" 
computer services is growing rapidly. 
Users can access vast data bases of news 
services, stock exchange market data, 
weather information, agricultural assist- 
ance, and whatever else the service pro- 
viders can dream up. In addition to public 
services, private groups such as local com- 
puter clubs are beginning to use data 
transmission to distribute their bulletins 
and programs. The user can even dial up 
original computing services. 

All that is required to be able to avail 
yourself of such services is a terminal, a 
telephone, and a modem -the means of 
connecting the two. 

A terminal is essentially a device with 
which a human being and a computer 
communicate. It can be "hardcopy" (a 
teletype or typewriter like device) or a 
"CRT" (using a TV type screen). In either 
case a keyboard or some other means of 
inputting data is necessary. A typical CRT 
terminal costs in the area of $1,500, with 
the hardcopy terminals usually being a 
little more, due to their mechanical 
complexity. 

The Sinclair is a prime example of the 
CRT terminal: it has a keyboard 
(although somewhat quaint i plus the TV 
as a display unit. Thus it is not surprising 
that ZX81, and T AS KXK) users are inter- 
ested in using their computers as terminals 
for the larger mainframe computers. The 
only thing lacking is the means of con- 
necting the computer to the telephone. 

The user must have a modem to form 
the interface between the terminal and 
the public telephone system. Since most 
telephone companies view with grave con- 
cern the idea of anyone attempting to 

V B. Rice. 1 19 Exeter Rd.. Ajax. Ontario. Canada. 
L1S2K4. 

November /December 1982 



send electrical signals through their lines 
and relays, the modem performs the 
function of translating the electrical im- 
pulses from the terminal into audible 
tones acceptable to the normal telephone 
lines through which we speak to each 
other. At the receiving end of the tele- 
phone circuit, another modem accepts 
the tones from the telephone speaker and 
converts them back into electric signals 
compatible with the receiving computer. 
The tone generating and recognition cap- 
abilities of this device resulted in its rather 
strange name which is a contraction of 
frequency MOdulator/DEModulator. A 
modem costs, in Canada, anywhere from 
$250 (Radio Shack) up to well over $1,000, 
depending on the speed with which it can 
transmit and receive data. 

An Interface Board 

It would be very pleasant if the ZX81 
could merely be attached to a modem 
and be magically transformed into a ter- 
minal. Unfortunately, this is not directly 
possible. You must have a device to con- 
nect a typical modem and your Sinclair 
called an Interface Board. Fortunately, 
you can build such a board because it is a 
reasonably simple circuit to wire up. If 
you have had any experience working 
with ICs ( Integrated Circuits), you could 
build one easily in a weekend, with time 
off for sleeping. With no experience (my 
case), you should be able to have it 
operational in a week of working even- 
ings. The cost should be in the range of 
$25 to $50 (Canadian), depending on how 
much shopping around you are willing to 
do for the parts. 

Although I designed and tested this 
interface board on a ZX81, it should work 
on the ZX80 also. However, the Basic 
interpreter will not be able to keep up 



with the line speed when receiving data 
because of the lack of a "FAST" mode on 
that model. The speed problem can be 
eliminated by the use of machine code 
programming for that routine. From the 
little information I have been able to glean 
on the new Sinclair Spectrum computer, 
this board will probably operate on that 
machine also. 

As an added bonus, this interface board 
will also allow the Sinclair to communi- 
cate with a terminal as well, or with an 
RS-232 wired line printer. 

I am grateful to David Sommers for his 
article "Experiments in Memory and I/O 
Expansion" (SYNC 1 :6). This was of con- 
siderable help to me in my experiment. 
For those who are interested in pushing 
the usefulness of the Sinclair to extremes, 
an excellent book is Interfacing Micro- 
computers to the Real World by M. 
Sargent III and R. L. Shoemaker and 
published by Addison Wesley Publishing 
Company in the U.S.A. 

Theory of Serial Data Transmission 

Inside the Sinclair, or any other modern 
micro for that matter, the communication 
between components is via "TTL" 
(Transistor to Transistor Logic). This is 
essentially a volt/5 volt current fluctu- 
ation, of extremely low power. Where the 
distance between components is mea- 
sured in inches and the number of parallel 
lines is immaterial, this method is per- 
fectly adequate. An example of TTL I/O 
is the Sinclair ZX Printer, which uses 5 of 
the 8 CPY data lines to operate and 
control the printer. 

This "convention" becomes unweildy 
when the distances involved grow, due to 
voltage attentuation through the wires, 
the number of lines, etc. The most gen- 
erally accepted alternative is "serially 
coded ASCII" (American Standard Code 
for Information Interchange). This is used 
between most computers which have ter- 
minal interfaces for low-speed telephone 
lines, and by the public data networks 
such as DATAPAC in Canada, and 
TYMNET in the U.S.A. 

This serial I/O involves breaking the 
data characters to be transmitted into 
individual bits, then shipping them down 
the line one bit at a time at a prede- 
termined rate of speed. This allows the 
use of only one wire, since the data is 
"turned sideways," and the signals can 
then be amplified to allow greater dis- 
tances between the sending and receiving 
devices. 

This protocol requires that the sending 
and receiving parties must have agreed 
(electronically) on the transmission speed, 
which is known as the "BAUD" rate, or 
"Bits Per Second," the number of bits 
which represent a full character, and the 
number of check or parity bits (if any) 
that will be included with each full data 

87 



Figure 1. 







/ c V 




Ih 








3 


K * 

J 


Q 
Q 


11 7 


7V7J 


M 


Vc< 

11 L£ 


J- 


l-o'l " 






_5J Jll 




A 





I 1 * 



/c3 






■K>o- 



7Vi%of 



C Pu- 



<^%> 



A" »■ 



All 1 



^^9 * 



Gl Y7 

G2A 6 

C2B > 

LSlM 4 
/'«■£ 3 

* 2 

B ' 

C YO 






7 c37 1 



III csr \ 






cs 



C/D 



„ csT "U. 



RO 



ii4Mr- cP«. 4 WR .| 

14 csi 



ts r*mc; 



-> IA-2 

era 



+ 5Vgnd elk 

JLL 



2 
5-8 



II 
12 

13 
10 



fcf 

8251 



T 



't 



r? 

* 
C 
J 



fcf-^ 5 



Vc 



TV90 /7VtS90 



, | rt| 2 | 3ToT 



26 4 20 Tlt o 

27 Do 

28 



DTR 



RTS 



RiD 



OSR 



Z€ rrs 



I 9 



24 



23 



13 



1488 

o 

/Cff 

o 



o 



IH 



*■ 3 I "1 



V«c 



7HQO / T<LbtO 



*» ! 7 |'°1 



/C 3 



A. 



RS232 23-pm connector 5 
pln#for modem /computer O U 

a rTo Z 



Y 



/ 



-a osr **>- 



-a cts V 



o +5V 




character transmitted. Since it is difficult 
to change the computer at the other end, 
the user must know in advance what the 
receiving CPU expects and act 
accordingly. 

Serial data output can be accomplished 
in a variety of ways: the Sinclair uses this 
form to "SAVE" files on cassette and to 
"LOAD" them back into core again. In 
this case the serialization is accomplished 
by software, loading each data character 
into a register and then shifting the bits 
off the end. If the shifted bit was a "1", a 
"one" sound is sent to the tape recorder; 
if the shifted bit was a "0", a "zero" sound 
is generated. The reverse process listens 
to the sounds from the tape recorder, and 
gathers the data bits together into bytes. 

88 



Transmission Speed and Noise 

Transmitting data in this manner to 
other CPUs is perfectly feasible, but there 
are two problems. First, the programming 
required to match the transmission speed 
to the receiving CPU is extremely com- 
plex. This is where the major building 
block of this interface board comes into 
the picture. 

The "USART" (Universal Synchro- 
nous/Asynchronous Receiver Trans- 
mitter) is a sophisticated chip which solves 
all these problems for you. You merely 
tell it the BAUD rate, the parity settings, 
and the character format to send or 
receive, and it does all the work. It will 
serialize the data you present and send 
the data out at the correct time intervals. 



When it is receiving, it will reconstruct 
the data characters and pass them out to 
you, along with any indications of errors. 
Great stuff! 

Second, the problem of electronic 
"noise" on the line is addressed by the use 
of the "RS-232" interface chips. Instead 
of using the to 5 volt TTL of the com- 
puter chips, the output and input to these 
chips is a negative and positive voltage: a 
"1" is -3 to -15 and a "0" 3 to 15 volts. 
Since the voltage is considerably higher, 
and the and 1 value variations are con- 
siderably wider with a zero level crossing, 
there is much less possibility of inter- 
ference and a far greater range 
capability. 

SYNC Magazine 



ZX80/81 USER Beat the Program 

Loading Blues with a 

DATA CONDITIONER II 

USE THE DATA CONDITIONER II to; 

• Eliminate cable changing 

• Allow accurate volume control setting for 

a perfect load every time. 

• Allow for easy cueing of tapes 

• Allow you to use the remote feature on 

your tape deck. 

Order TODAY by phone using Visa, American 

Express, Master Charge, 24 hour toll FREE 

number 1-800-367-5134 

order part number CSL-DS $49.95 

address: Communication System 
Laboratories 
94-165 Leokane Street 
Waipahu, HI 96797 

allow 3 weeks for delivery 

add $3.50 for shipping & handling (air parcel 

post) 
add $5.00 UPS Blue Label 



EZRA GROUP II 
EZRA GROUP II 

LOW LOW LOW LOW LOW LOW LOW LOW LOW 
PRICES! 

Biorhythms 8K ROM/lK&up 1.00 

Graphics Billboard 0/lup 1.00 

TAP WRITER TM (Handicap Aid) 8/1. FREE 

Horse Race 8/lup 2.00 

SPINNER TH(like Rubik's)8/16. . .2.00 

Improved SLOW PAUSE 1.00 

Linear Regression 8/lup,. 2.00 

CHAR. Generator Demos 8/lup. .. .2.95 

Plotting Work Sheet 8/1 3.95 

Plotting Work Sheet SLOW/16. ...6. 95 

SPLIT-A-STACK TM SLOW/lup 2.00 

CHEWTER TM(like PACMN) SLOW/16 .. 2 . 95 

ISLAND SQUARES TM SLOW/2up 2.00 

Random MUSIC I SLOW/lup 2.00 

BASIC Keyword Demos 8/1 from .50 

ORDER, SASE,reSASE gets you GOO- 
DIES Catalog and 1! FREE I! Program 

EZRA GROUP II 
EZRA GROUP II 

POB 5222 San Diego, Calif ornia 92105 



1 



EZRA GROUP II 
EZRA GROUP II 

WE CHALLENGE THE SOFTWARE COMPANIES 
TO LOWER THEIR PRICES! 

Biorhythms 8K ROM/lK&up 1.00 

Graphics Billboard 8/lup 1.00 

Horse Race 8/lup 1.00 

SPINNER TM(like Rubik's)8/16...2.00 

Improved SLOW PAUSE 1.00 

Linear Regression 8/lup 2.00 

CHAR. Generator Demos 8/lup. .. .2. 95 

SPLIT-A-STACK TM SLOW/1 up 2.00 

CHEWTER TM(like PACMN) SLOW/lup. 2 . 95 

ISLAND SQUARES TM SLOW/2up 2.00 

Random MUSIC I SLOW/lup 2.00 

BASIC Keyword Demos 8/1.... from .50 

ORDER, SASE,reSASE gets you GOO- 
DIES Catalog and &Q$£c. Program 

EZRA GROUP II 
EZRA GROUP II 

POB 5222 San Diego, Calif ornia 92105 




ZX81 OWNERS 

SPECIALISED PRODUCTS 
MODULAR EASY TO USE 
FOR HOME/INDUSTRY b 
EDUCATION 



TE10 INPUT/ OUTPUT PORT - Easy to use Fits between ZX b RAM 
PACK PRINTER (if requiredl. No skill required to connect Can be used tor 
such things as: - motor control; sound/music generators, connection to 
printers/ floppy discs/light pens/other computers, temperature monitoring, 
square wave generating, control of rotating aerials, even tram sets etc Port has 
16 programmable 1 ,'0 lines and may be used without any electronics knowledge 
to connect other add-ons Motherboard required ONLY when two or more add- 
ons are used at any one time 

FULLY ASSEMBLED $29.50 

KIT I WITHOUT CASE) $24.50 

TE12 4 CHANNEL RELAY BOX - Tn suit Port Contact rating- 240V 
AC/1.5A - 24V DC or 110V AC3A, L.r to 4 units i.e. 16 relays can be 
operated $24 50 

TE15 SWAY TRANSISTOR DRIVER - $16.50 

TE17 8WAYSWITCHUNITIEDUCATIONAL) - $21.50 

TE18 8 WAY INDICATOR UNITIEDUCATIONAL) - $21.50 

TE20 JOYSTICK b FREE GAME 12 Joysticks may be connected via 
Motherboard I $21.50 

TE30 MOTHERBOARO - Allows multiples combinations of add-ons - up 
to 16 1/0 line* may be used - $26.50 

NOTE TE 12/15/18 Require 9V 300mA 
Calculator Type Power Supply 
23 ♦ 23 WAY ZX Edge Con $5.00 

16 WAY SINGLE SIDED EDGE CON $3.50 EXTENDED PIO NOTES $2.50 
PRICES INCLUDE POSTAGE 

Receipts always provided. - Delivery normally en-stock ADD 
Full instructions and examples with all products. 
Send for catalog $1.00. MasterchargeiVisa accepted 

SEND SAE F0H CATALOGUE TELEPHONE ORDERS 
ACCEPTED 

DISTRIBUTOR INQUIRIES INVITED 



THURNAU (ELECTRONICS) ENG 

0EPT V. 95 LIVERPOOL R0A0 

CADISHEA0. MANCHESTER 

M30-5BG ENGLAND 
TEL 061-775 4461 (24 hr) 



eW 



The RS-232 standard also describes a 
special 25 pin "D" connector, with all 25 
pins accounted for. In actual practice, 
only 4 pins are really necessary for ter- 
minal use, one each for data input and 
output, and two grounds. This convention 
also assigns a male connector (DB25-P) 
to the terminal (the Sinclair in this case), 
and a female connector (DB25-S) for the 
modem. 

Circuit Overview 

The heart of this circuit is the USART, 
in this case, the INTEL 8251. By tying 
this IC to the address decoding scheme 
provided by David Sommers, together 
with a clock dividing circuit, and an RS- 
232 transmit and receive pair, we have' a 
workable interface board. I also followed 
his directions and added a few extra mem- 
ory chips to buffer the incoming mes- 
sages. This added another $30 to the cost 
of the board. Debugging the circuit 
took a fair bit of trial and error. The main 
problem was in the timing circuit. 

The data clocking on the board is 
derived from the 3.25 MHz CPU clock 
used by the ZX81. (MegaHerz where 1 
MHz 1/1,000 sec.) The circuit described 
in this article is wired to provide a 300 
BAUD data rate, which is more or less 
standard for voice-grade telephone line 
communications and just about the max- 



imum that can be handled by a program 
written in Sinclair Basic. I have experi- 
mented with the timing circuit and have 
run the BAUD rate up to 9,600 with no 
problems, but at that speed the control 
program has to be written in machine 
code to keep up with the incoming data. 

Since the I/O circuit board is memory 
mapped, you can write your terminal 
programs in Basic; no machine language 
code is necessary unless you really want 
to get fancy. Initializing/resetting the 
USART is done by merely POKEing the 
required values to an address in core: 
sending a data byte by POKEing the 
ASCII value into another core address, 
and reading a byte by PEEKing at the 
same core location. These addresses are 
determined by the wiring in the circuit 
board. In this example they are locations 
21508 for the 8251 control port and 22532 
for the data port. Actually they will 
respond to any address up to IK above 
these respective addresses. This poses no 
problem unless you have an expansion 
RAM pack. The results of running with 
the RAM pack attached will be unpre- 
dictable. 

By using the CPU I/O control lines for 
chip selecting, the circuit can be I/O 
mapped instead of memory mapped. In 
this case IN and OUT machine code 
instructions will be required to operate 



the circuit. This will complicate the pro- 
gramming required to use it. 

Circuit Components 

Let's look at the major components 
shown in the circuit wiring diagram 
(Figure 1) with a short discussion of the 
purpose of each. The IC number from 
the diagram is followed by the IC type in 
parentheses. The actual manufacturer of 
the IC is immaterial, with the exception 
of the 8251 USART which is only made 
by Intel. All of the ICs in the circuit are 
readily available; most of them are stock- 
ed by Radio Shack. 

a. IC1 (74LS138) 

IC1 forms the address decoding circuit, 
with output control lines shown as Chip 
Select 1 through 7. I used CS6 for the 
control port and CS7 for the data port on 
the USART. CS1 through 5 can be used 
for 5K of onboard memory. Adding 2 
more 74LS138s as per Sommer's article 
can increase the available address range 
up to 32K if required. 

The inputs shown on the wiring dia- 
gram for this IC (A 10-14, MREQ and 
RAMCS) are taken straight from the back 
of the CPU. 

b. IC2 (74LS08) 

IC2 is used for combining control lines. 

c. IC3 (74LS04) 

IC3 is required for inverting the signal 



-81 SPACE RAIDERS 



TM 



ZX81 




FR= 3 292 E 05 6E= 1 297 E 03 



TX = 
TY = 
TZ = 



8 275 E 05 
1 182 E 07 
4 780 E 06 



X = 5 222 E 05 
Y = -2 574 E 05 

Z = 5 692 E 06 



-A 



16K 
RAM 



The federation has 
declared a state of all-out war. 
leaving you in charge of the 
Starship Defiant: newest and 
most advanced spacecraft 
known to man. 

Soon, your experienced 
guidance will bring you within 
range of the enemy convoy. 
Hundreds of stars flash by as 
you check the status of your 
Laser, Shields, Masking 
Navigation, Scanning, and 
Computation Equipment The 
energy drain is tremendous, as 
the target distance indicator 
ticks slowly downward 

As you come into range 
you set your cross-hairs on the 
nearest ship. Fire Laser! ! i 
Switch to Aft view! ! ! Evasive 
Maneuvers! ! ! Space explodes 
all around you as the first 
enemy ship disintegrates and 



the remainder lock onto your 
position . . 

High speed graphics and 
custom ML math package 
provide the real time, accurate 
simulation of the above space 
navigation and battle scenario 
You've never seen this kind of 
performance on your ZX81 
before! 

Only $19 95 for cassette, 
keyboard overlay, and manual 
(shipping included). (Utah 
residents add $.95 tax) 



NIRAD 
ELECTRONICS 

959 East 460 South 
Provo, UT 84601 



V^ 




WANTED... 

the non-exclusive rights to 
manufacture and sell your 
Timex/Sinclair educational and 
entertainment programs. 

We will pay 

CASH 



DALLAS DEVELOPMENT SYSTEMS 

7410 Stillwater 

Garland, Texas 75042 

(214)238-1776 




90 



SYNC Magazine 



from the CPU clock. To minimize noise 
problems with this IC, tie all unused in- 
puts high (i.e., connect pins 9, 1 1, and 13 
to pin 14 which is 5 volts). 

d. IC4 (74LS73) 

e. 1C5 and 1C6 (74LS90) 

ICs 4, 5, and 6 are cascaded together to 
produce the data clock required by IC7 
(the 8251). The CPU clock is inverted by 
a 74LS04, then divided by 7 by IC5, then 
by 3 by IC4, and by 8 again by IC6. Using 
this scheme, the USART data clock can 
be tapped off either pin 1 1 of IC5 to give 
BAUD rates of 9,600 and 2,400, or pin 8 
of IC6 (as shown) to give BAUD rates of 
1,200 and 300. (The dual BAUD rate is 
program controllable). 

The CPU clock (inverted) is tied 
straight on to the clock input for the 
USART. Although the specs for this chip 
specify a maximum clock rate of 2MHz, 
it works quite happily at the higher clock 
frequency. 

f.IC7(8251 USART) 

This is the parallel to serial data I/O 
handling module. 

g. IC8 (1488) 

This is the RS-232 transmitter. 

h. IC9 (1489) 

This is the RS-232 receiver. 

IC8 and IC9 are an RS-232 transmitter/ 
receiver pair which are wired to the I/O 
pins of the 8251 to provide the actual 



interface to the outside world. The 1488 
requires a +/-voltage set higher than the 
TTL 5 volts used by the rest, so be very 
careful about the wiring on this one. 
Although the RS-232 specs call for +/-15 
volts, anything between +7 to +15, and 
-2.5 to -15 will work. My prototype board 
uses the 9 volt CPU power supply for the 
positive voltage and a square 9 volt bat- 
tery for the negative. It is still working 
with that configuration. One battery lasts 
for about a month of rather heavy use. 

Note that in Figure 1 the power supply 
pins are omitted for the 1488 and 1489. 
The 1489 power supply is 5 volts to pin 
14. Both of these ICs require pin 7 to be 
connected to ground. The 1488 RS-232 
higher voltage range is connected with 
+7 to + 15 volts on pin 14, and -2.5 to -15 
volts on pin 1. 

/'. / DB25-P connector 

This is used to attach the Sinclair to 
your modem. 

j. 1 socket of 1/10 inch spacing. 

This is to fit the back-plane of the 
Sinclair. 

k. A wire-tapping circuit board, IC 
socket, etc. 

These are used as required. 

Construction Techniques 

For the actual process of wiring the 
board, I strongly recommend the use of a 



wire-wrapping tool. After having had a 
bit of experience attempting to solder 
together IC circuits, my initial reaction to 
using a wire-wrapping was, "Where has 
this been all my life?" 

Remember also that the 8251 is a 
CMOS chip and that it takes very un- 
kindly to any type of static electricity. 
The safest way to handle it is to carefully 
avoid touching the pins with anything. 
Keep it in conductive foam or stuck into 
aluminum foil when out of the board, and 
jam aluminum foil over the wire-wrap pins 
on the back of the IC socket when insert- 
ing the chip into the socket. 

I have attempted to use what appears 
to be the standard form of circuit diagram 
in Figure 1, but my personal method is to 
draw a picture of the IC from the bottom 
(the direction you will be looking at the 
socket from when wiring it), with the pin 
numbers and where they will be wired to 
in the finished product. 

Notes on Figure 1 

A few notes on Figure 1 will be helpful 
at this point. 

1 ) The connections indicated as "CPU" 
on the diagram are connected to the plug 
you will have made to fit the back the 
CPU. None of these ICs require 
buffering. 

2) On IC7 (the USART), pins 14, 15, 



WHAT ARE YOU WAITING FOR? 

INTRODUCING 

A SOFTWARE BASED CASSETTE TAPE STORAGE SYSTEM FOR 
ZX8I AND TS1000 COMPUTERS 

■ 6 TO 10 TIMES FASTER than Sindo.r LOAD ond SAVE routines 

■ FAST ARRAY VARIABLE loodmg ond saving independent of program 
• FAST BINARY DATA loodmg ond sovmg onywhere in RAM 

■ USER FRIENDLY PROMPTING in either immediate or program modes 

■ NO HARDWARE CHANGES. Period. Works with y our exiting system 

■ LESS THAN 2K OF RAM is occupied by Z-XLR8. residing between 

16-18K.25-27K.or 30-32K for cassette version EPROM version 
resides between 14-16K 



Z-XLR8 CASSETTE $9.50 



Z-XLR8 EPROM $19.50 



ALSO 

256 X 192 BIT MAPPED HI RES GRAPHICS FOR ZX8I & TS 1000 

COMPLETE PLANS $5.00 

ADUfiNCED INTERFACE DESIGNS 

P.O. BOX 1350 

STATE COLLEGE. PA 16801 

tn USA Pleose Include $1.50 for Prompt Hondhng and Shipomg 
Outside USA Include $3 00 
PA Residents Add 6* Soles Tax 



ZX81 PERSONAL BANKING SYSTEM 

WITH LOAD/SAVE DATAFILES 

AT DOUBLE SPEED 

Load the program in the normal way — enter, amend or delete your 
transactions (ZX81 will automatically scan standing order file and post 
any items due) — save the file of data onto cassette in 45 seconds— load 
a different datafile into the same program, also in 45 seconds — enter 
items, etc —save datafile only onto cassette (45 seconds) — repeat 
operation for any number of accounts 

Absolutely no need to save program, as all information is held in data- 
files. Very easy to use — unlike other bank accounts. Requires a mini- 
mum of 16K RAM — can use much more (no modification required). 
On Demonstration at the next ZX Micro Fair 
The Personal Banking System also includes the following features- 
Full page detailed Bank Account, dual display (or printout). 
Automatic generation of standing orders on due dates 
Validation of all entries. 

Correct any item previously entered (Single/Multiple field correc- 
tion) 

Enter an item (previously omitted) in the correct date order of the 
account. 

Single key operation Utilises a M/C keyboard scan. 
Search for any item or items by cheque number, description or 
amount — display (and printout if required) with totals 
Continuous display of statement extract, continually updated dur- 
ing input of entry 

File of standing order details can be displayed, printed, added to. 
cancelled and amended 
Detailed User Manual 
After sales maintenance. 
Sena L9 95 (S20) mcl. for cassette and users manual to J P Gibbons 
A.I.B.. 14 Avalon Road. Orpington. Kent. BR6 9AX, England (Send 
large S A E for details). 

There are only two suppliers of supported ZX81 software, this is one of 
them Be sure to include your name and address 

Bank Reconciliation Module — a separate program on 
£6 50 cassette that utilises data supplied by the mam program 

($13.00) (S.AE for full details) 

The only expandable system for the ZX8 1 
The Personal Banking System is also available from Sinclair Place, PO 
Box, 2288 Redmond Wa. 98052 (see their ad), full maintenance still 
available. 



November /December 1982 



16, 18, and 21 are not required and are 
not shown on the diagram. Just leave them 
unconnected. 

3) IC3 (the 74LS04) should have all 
unused inputs tied high to prevent noise 
problems. This means connect pins 5, 9, 
11, and 13 to the +5 volt source (pin 14). 

4) The unused Chip Select lines on IC2 
(the 74LS08) may be left unconnected. 

5) ICs 2 and 3, sections of which are 
scattered throughout the wiring diagram, 
both require that pin 14 be +5 volts and 
pin 7 be ground. 

6) ICs 4, 5. and 6 also have several pins 
unaccounted for in the diagram. Again, 
leave these pins unconnected. 

7) The pin numbers shown beside ICs 8 
and 9 are for an RS-232 male connector, 
meaning the Sinclair is wired as a term- 
inal. If IC9 pins 4 and 10 are tied high 
with the resistors as shown, they need not 
be wired to the RS-232 connector and 
vice-versa. 

8) Pins 1 and 7 of the RS-232 connector 
must be connected to the CPU ground to 
complete the circuit. 

9) Interesting and useful LED indicators 
can be added to indicate transmit and 
receive activity. Use a very small LED, 
with a series resistor (e.g., 2.2K ohms) 
connected to ground. Wire one of the 
LEDs to pin 1 1 of IC 8. the other to pin 1 
of IC9. 



10) There is the problem of a plug with 
which to attach the circuit board to the 
back-plane of the ZX80/81. The normal 
procedure is to obtain a plug of 1/10 inch 
spacing and cut it to fit. It would be nice 
to be able to purchase the correct unit 
over the counter. There is a very pretty 
pig-tail pass-through version on the ZX81 
printer, but it cannot be bought sep- 
arately, A diagram of the pin-outs of the 
back connector is found in the Sinclair 
manual. 

11) Either purchase a general IC data 
book or obtain a copy of the data specs 
for the ICs you buy. Radio Shack prints 
the data specs on the IC package. Other 
stores will probably supply a copy of the 
specs on request. This can eliminate many 
problems, especially misprints in maga- 
zine articles. I would also recommend 
two Radio Shack books: Engineer's Note- 
book II, stock number 276-5002, and the 
Archer Semi-conductor Reference Guide, 
stock number 276-4005. 

12) There appear to be no problems 
with the calculator power supply which 
comes with the ZX81. I added an addit- 
ional 8251 circuit plus an extra 7K of 
(static) RAM onto my original board, and 
the entire system still works perfectly well 
with the original 650 MW power supply. 



Building and Testing the Interface Board 

The actual construction of the board 
depends on your experience in such pro- 
jects. I am a rank amateur so the tech- 
niques I used are probably not particular- 
ly professional. 

The physical layout of the components 
on the board is a matter of your personal 
aesthetics, but I would recommend keep- 
ing the components which form each sub- 
circuit grouped together on the board, 
e.g. the clocking circuit, the address select 
circuit, the RS-232 components, or extra 
memory. Try various layouts by moving 
the IC sockets around on the board before 
wiring them to see what the end result 
will look like. 

The steps I went through in designing 
and building the interface are roughly as 
follows: 

1) Cut and adapt a plug to fit the back- 
plane of the Sinclair. This step depends 
on the plug you managed to scrounge 
and on what you wnat the finished 
product to look like. When you cut it, 
remember to leave "ears" on either side 
so that you can get the plug off the com- 
puter again without breaking anything. 
The plug I found was a wire-wrap type. I 
pushed the pins through the IC spaced 
perf board from Radio Shack (stock num- 



Z-80 

SOFTWARE 

NOTEBOOK 

A must for anyone wishing to program the ZX-80/81 or TS 
1000 in machine language! Contains over 25 useful tech- 
niques, utilities and programs that will turn even 1 K systems 
into computing giants. 

Sorting, timing loops, searches, block transfers and many 
more are included. The complete Z-80 instruction set is fully 
explained and listed. $7.95 pp. 



BASIC 
HANDYMAN 

BASIC sub routine that will streamline your program and save 
your valuable time. Puts the experience of advanced pro- 
grammers at your fingertips! 

Sorting, searching, data files, display file handling, screen- 
save, graphs and special functions galore are given and com- 
pletely explained. $6.95 pp. 

FREE TITLE CENTERING ROUTINE WITH 
ORDER 

ZWARE 
P.O. BOX 1 1 1 
ALBANY KTY 42602 

ORDER NOW FOR CHRISTMAS 



DON'T LET GLITCHES, SPIKES OR POWER 

FAILURE WIPE OUT YOUR RAM PROGRAM 

AND DATA. AVOID SYSTEM CRASHES WITH 



SYNC - SAVER 

RAM BACKUP POWER FOR SINCLAIR 



The Sync-Saver is a battery backup that protects your 
RAM against power interruptions. Simple to use, well 
engineered, it comes in 2 forms: 

SVR-1. A rechargeable Nickel-Cadmium battery 
(included) system to maintain 1K to 16K RAM in the 
ZX80/ZX81/TIMEX for 1 hour. Batteries recharged 
automatically. Complete - ready to use. 

SVR-2. An economical alkaline battery (not in- 
cluded) system to maintain ZX80/ZX81/TIMEX with 1K 
or 2K RAM for 1 hour. No battery recharge. 

Both systems feature added surge /transient 
suppression, ON-OFF switch to reset or turn off com- 
puter, and DC ON pilot light. 

SVR-1 $49.00 SVR-2 $17.50 

Prices include postage and handling in U.S. 
Foreign orders add $2.00 
Send check or money order to: 

LUXTRON Inc. 

241 Winter St., Haverhill, Mass 01830 



92 



SYNC Magazine 



ber 2276-1396). I ended up with a great 
board standing up on the back of the Sin- 
clair. This looked fragile and ugly. A 
better idea would be to use ribbon cable 
from the computer plug to another, more 
standard plug and plug-in type wiring 
board. This also would allow boxing the 
interface board. 

2) Check all the connections with the 
ICs out of their sockets with a multimeter 
or continuity tester to eliminate shorts or 
crossed connections. 

3) Next I wired the address select chip 
and a memory chip onto the board. Only 
two ICs are required plus a 7441S08. The 
wiring is simple, and the results are easily 
verified. (Refer to the paragraph on add- 
ing extra memory.) The wire-wrapping 
tool simplified both the wiring process 
and the subsequent unwiring of mistakes. 
If adding the memory is successful, you 
will have given yourself some extra mem- 
ory to play with and gained some good 
experience in wiring techniques. 

Remember that on the wiring diagrams 
the IC pins are numbered looking down 
from the top whereas the wiring process 
is performed from underneath. Try 
writing the pin numbers beside a few of 
the socket pins on the bottom of the perf 
board so that you do not get confused 
when you are looking at it. 



Remember also to check the wiring 
before you apply the power! After the 
fact diagnosis, by observing which com- 
ponents are smoking, is unprofessional. 

4) Once you have given yourself a 
morale boost by the memory addition, 
you will be considerably more enthusiastic 
about approaching the pile of ICs re- 
quired for the actual I/O circuitry. The 
order of the wiring probably does not 
make much difference because without 
expensive equipment the circuits cannot 
be tested anyway. I proceeded with the 
clock circuit, then the 8251, and the RS- 
232 ICs, in that order. 

5) The 9 volt power supply from the 
Sinclair is perfectly adequate to power 
the 1488 (pin 14). Connect pin 1 of the 
1488 to the negative pole on a square 9 
volt battery. Connect the positive pole of 
the battery to the common ground (pin 
7). You can achieve this same effect with 
any type of power supply of similar 
voltage. 

6) After all the sockets are in place, 
check the wiring very carefully before 
plugging in the ICs and applying the 
power. 

7) Testing the completed circuit board 
should be as simple as attaching a modem 
and trying out your software. If it does 
not work, your only recourse is to pull 



out all the ICs and go over the wiring 
again very carefully. The only problems I 
encountered (other than trial-and-error 
mistakes during the circuit design stage) 
were directly attributable to mixing the 
pin numbers when wiring the com- 
ponents. 

8) The address select circuit can be 
tested by changing the select lines on 
your memory chips, then POKEing and 
PEEKing at the new addresses. Note that 
the power-up sequence of the Sinclair 
will not accept the RAM at other than 
contiguous addresses, but the POKE and 
PEEK instructions will function properly. 

9) The actual I/O circuit is much easier 
to test if you can borrow an ASCII ter- 
minal. With the terminal you have much 
more control over what is going in and 
out of the circuit. You can send and 
receive one character at a time. Testing 
with a modem to a remote computer gets 
a bit tricky because of the longer mes- 
sages which will be sent to you. Of course, 
you can always get together with a friend 
with a Sinclair, build two interface boards, 
and hook them together for testing. 

10) When developing the software to 
drive this device, start off with a very 
simple program in Basic. As you send or 
receive a character or string, use the 
PEEK command to display the data in 
memory and the contents of the USART 



BARRICADE: HIGH SPEED ACTION GAME - S12.95 

"BREAKOUT" for the ZX81 ! Break through the 5-waU 
Barricade with the high-speed ball and keyboard 
controlled paddle! Trap the ball among the walls 
and watch it destroy the 100 blocks! Select from 
96 options <8 speeds, 4 paddle sizes, and 3 
ball-angle limits) to challenge both expert and 
beginner. 3 scores with the best of each saved to 
be challenged by other players. 100% machine 
language, so it's fast! 8K/16K. Available now. 

ZXH-1: ZX81 MACHINE LANGUAGE MONITOR - S19.95 

Based on our popular RSM monitors for the TRS-80, 

ZXM-1 provides over 15 commands with which you can 

interact directly with the Z-80 processor in your 

ZX81 . You will have direct access to all memory 

locations and input/output ports. You may examine 
your Basic ROM's, test RAM, enter and execute 
machine language programs, and much more! 

A symbolic dump command disassembles object code 
in memory and displays it as Zilog standard Z-80 
mnemonics! All relative addresses are computed 
and displayed. This is a great aid to 
understanding the operation of your ZX81 software. 

Memory may be displayed in HEX, ASCII, or ZX81 
characters. You can SEARCH, EDIT, MOVE, EXCHANGE, 
VERIFY, FILL, ZERO or TEST memory. Pause, single 
step or continuous dumps with memory display 
commands. 16K only. Available Dec 15. 




MALL 
YSTEM 




SHALL SYSTEM SOFTWARE 

Post Office Box 366 
Newbury Park CA 91320 
Phone: (805) 523-7295 



THE BEST VALUE NEXT TO YOUR COMPUTER 
IS SUPPORTED SOFTWARE ON CASSETTE 

zxsi MX-PAC TS100 ° 

IO useful/fun programs on CASSETTE 
make the small memory act like much 
more-for the whole family. .games. . 
files. .lists. .SUPER draw-on-tv, se- 
curity codes.. 3-D motion and growth 
simulations. .bar graphs. . financial 
helpers (loans, tax) -t-more+all BASIC 
..all explained in Printout 1.. 

. and 

extraordinary BOOK / Printout 1 
shows how the 18 work and GROW and 
GROW . .many ideas.. even more line- 
numbered add-ons for 2K and 16K 
power -multilevel files , lists, games . . 
a keyboard "light-pen" that makes 
draw-on-tv a powerful designing tool - 
menu-driven programs-f inane ' 1 planner 
. . a complete recipe file (16K) . . step 
by-step build a checking account (16K) 
-"unbreakable" codes and a challenge 
THE GREATEST RANGE AND DEPTH OF ANY 
SOFTWARE is only $24. 95.. Act today! 
Send check or MO to ROBILL PRODUCTS 
555 PARK AVE. ,PATERSON,NJ 07504 ALL 
ORDERS processed fifo. Please add 
$2.75 p/h (1st class)NJ res. add 5% 



November/December 1982 



93 



control port to familiarize yourself with 
the format of the messages and control 
flags. By starting off simple, you can then 
proceed to build more complex programs. 

Programming Your Sinclair Terminal 

The general steps required to transmit 
and receive data may be related to Figure 
2, the sample program listing. The actual 
steps may vary depending on the specific 
circumstances. For instance, if you are 
communicating with another Sinclair, the 
data do not have to be translated into 
ASCII and back to the Sinclair Character 
set. 

Receiving Data 

1) Initialize the control port to receive. 

2) Check the Status Read flags for 
RxRDY (a character has been received). 

3) When a character has been received, 
move it from the data port to memory. 

4) Loop through steps 2) and 3) until a 
message end character are received. The 
message end character will depend on 
whatever protocol has been decided 
between the sender and receiver. Refer 
to Figure 8 for the standard ASCII control 
characters and their meanings. 

5) When the message is complete, trans- 
late the received ASCII characters to the 
Sinclair character set and display the 
result. 



Figure 2. . 



SRMPLE PROGRAM 



I 
10 

28 
38 
95 

iee 
na 
lse 

195 
28B 
210 
215 
220 
240 
250 
306 
3S0 
330 
34.0 
350 
360 
366 
370 
380 
390 
405 
410 
420 
SOS 
510 
520 
S30 
505 
610 
620 
630 
635 
640 
650 
660 
695 
700 

3 
710 
720 
795 
300 

3 
810 
815 
820 



REM 
LET 



UP LRBELS 



:HR* Y; 



fSET 
1508 
C+1024 

LET M=123 

REM MB INIT TO RECEIVE ]■■ 

POKE C764 

POKE C,M 

POK.E_C.20 

REM MB1 REBD ROUTINE ■_■ 

IF PEEK C»133 TMEN GOTO aig 

REM ■_■ 5BUE DBTR IN X* __i 

LET X«=X*+CHR« (PEEK D) 

IP PEEK D-13 THEN GOTO 300 

GOTO 21 

REM ■_■ TRfiNSLflTE MSG ■_■ 

FOR PTl TO LEN X* 

LET Y-COOE (X*(P TO P) ) 

LET Y=Y-27 

IF Y<31 THEN LET Y=Y+7 

IF Y__8 THEN LET Y«0 

REM Wmm PRINT ERCH CMRR 

PRINT Ch" 

NEXT P 

PRINT 

REM MB GET MSG TO SEND 

INPUT X* 

CLS 

REM MSB INIT TO SEND HH 

POKE C. 64 ^^ 

POKE C,M 

POKE C, 49 

REM ■_■ SEND MESSRGE MM 

FOR 0=1 TO LEN X* 

LET Y»=X*(0 TO O) 

LET Y_CODE Y* 

REM ■_■ TRANSLATE MSG 

IF YTFfl" THEN LET Y=YTS 

IF Y*>"9" THEN LET Y=Y+27 

IF Y«=_ " THEN LET Y=32 

REM ■_■ SEND EACH CHAR ■■ 

IF PEEK C < > 133 THEN G0T07IZ 



POKE D.Y 

NEXT O 

REM _■ SEND END OF TEXT . 

IF PEEK C < > 133 THEN GOTO 

POKE D J 13 

REM __H MOU READ AGAIN 
GOTO 100 





BEAT THAT HIGH SCOREI 
GOB8LE THOSE DOTS 
BEFORE THOSE MEANIES 
GOBBLE YOUI YOUR ONLY 
AIDES ARE FOUR "POWER 
PILLS" WHICH MAKE THE 
MEANIES EDIBLE. BUT 
NOT FOR LONG! 

• MACHINE CODED FOR FAST ACTION 
•EXTRA "GOBBLER" FOR 10,000 POINTS 

• ON SCREEN SCORING 

•HIGH SCORE WITH "ENTER NAME" FACILITY 
•UP TO 4 PLAYERS 

AN ANN0YINGLY FRUSTRATING GAME IFOR ONLY $14.96 




STAY ALIVE AS LONG AS POSSIBLE IN OPEN SPACE FILLED WITH FLYING ROCKS 
SCORE BY SHOOTING THEM - WHICH ALSO CAUSES THEM TO BREAK INTO LOTS 
OF LITTLE BITS AND MAKES LIFE EVENWORSEI 



• MACHINE CODED FOR 
FAST ACTION 

•ON SCREEN SCORING 

• HIGH SCORE WITH 
'ENTER NAME' FACILITY 

• up TO< PLAYERS 



•EXTRA SHIP FOR 1 000 PTS 
INOT AS EASY AS IT 
SOUNDS!) 

•SHIP MOVES JUST LIKE 
ARCA0E VERSION 

• ROTATE LEFT/ROTATE 
RIGHT/THRUST 



• FIRES IN ALL 8 
DIRECTIONS 

• INCREASING NUMBER 
OF ASTEROIOS 

• THREE ASTEROID SIZES 

• 'NASTY' ALIEN SPACE 
SHIP (FIRES BACK!) 



THIS GAME IS JUST AS BAD!- AND ONLY $14.95 
AN OFFER FOR REAL MASOCHISTS-BOTH TAPES F0R$24.95 

MAIL ORDER ONLY-PLEASE MAKE CHEQUE/PO PAYABLE TO 
C«- THE SOFTWARE FARM DEPT C E-. 

^W= CRAIGO FARM, BOTANY BAY, TINTERN, GWENT ^f 

^_^^^^^^ENGLAN^^^^^^^^^' 



Sending Data 

1) Initialize the control port to trans- 
mit. 

2) Input a line (from the Sinclair). 

3) Translate each character of the mes- 
sage to ASCII. 

4) Check the Status Read flags for 
transmitter empty (TxMT). 

5) When the transmiter is empty, POKE 
the translated character into the data 
port. 

6) Send whatever end of message char- 
acters are required by the receiver (LF. 
ETX, CR, etc.; refer to Figure 8) onto the 
translated message. Perform steps 4) and 
5) for each control character. 

This can just barely be done on a IK 
machine. Since putting additional RAM 
on this board is a very minor matter, 
there is no reason to stay with a IK 
machine anyway. 

Figure 2 contains a small Basic program 
whose only value in life is to demonstrate 
the use of this circuit. It will receive one 
line of data, then turn around and send 
one Line of data, and on, and on. The 
messages are assumed to be under 80 
characters in length and to consist of 
nothing but numeric or alphabetic char- 
acters. The program will work in IK if all 
the REM statements are removed and 
the messages are kept under 40 characters 
in length. 



OMNI TEMPLATE 

FOR ZX-80 and ZX-81 

WHA T IS OMNI TEMPLA TE? 

It is a template program for generating other programs. 
While developing programs, our staff needed a collec- 
tion of general utilities to avoid the burden of repeating 
the same routines over and over. This gave birth to 
OMNI TEMPLATE. We found it so effective that we 
decided to share it with others. 

WHY SHOULD YOU HA VE IT? 

It is a great training tool. It helps you to develop a habit 
of writing professional-looking programs rather than 
rag-tag patch works. It makes programming fun. 

W HA T DO YOU GET? 

You will receive a cassette tape of OMNI TEMPLATE 
Program prerecorded and readv to use. Three addition- 
al programs: RACING, INDEX-CARDS and FIT- 
POINTS, which were developed by OMNI TEMPLATE, 
are on the tape in addition to OMNI TEMPLATE. A 
complete listing of OMNI TEMPLATE and a well- 
documented manual describing how to use OMNI 
TEMPLATE is included. 

HO W DO YOU GET OMNI TEMPLA TE? 

It is $9.50, if ordered before December I. 1982. It 
becomes $ 14.50 after that. Please add $ 1 .00 for shipping 
and handling. Send money order or check to: 

Omni Technology 
P.O. Box 10630 
Pittsburgh, Pa 15235 

PA resident please add 57 cents for PA sales tax. 



94 



SYNC Magazine 



Mode Set for the USART Control Port 

To initialize the USART, first send it 
an internal reset. This must be followed 
by a mode set, then the required control 
command. All of these steps are accom- 
plished by POKEing the correct values 
into the address at which the control port 
has been wired. 

The values of the various bits in the 
Mode Instruction are shown in Figure 3. 
Take the decimal value given for each bit 
to be on in the instruction, and add them 
together to obtain the value to be POKEd 
into the Control Port address. The Basic 
code is from the sample program in Figure 
2. 

For example, 
10LETC=21508 

(address of USART control port) 
20LETD=C+1024 

(address of USART data port) 
30 LET M= 123 
(mode setting) 

When using this circuit connected to a 
telephone modem dialed to the DATA- 
PAC network, the mode setting is 123d, 
or 7Bh. Referring to Figure 3, this trans- 
lates to: 

1)1 stop bit (S2=0,Sl = l:bit value=64). 

2) Even Parity (EP=1 : bit value=32). 

3) Parity checking Enabled (PEN=1 : 
bit value=16). 



4) 7 bits/character (L2=1,L1=0 ; bit 
value=8). 

5) BAUD rate =300, 1/64 data clock 
rate (B2=1,B1 = 1 : bit value=3). 

Adding these bit values together we 
get: 64+32+-16+8+3=123. 

USART Command Instructions 

Command Instructions are used to 
specify to the USART what operations 
you require that it perform. In this circuit, 
we are mainly interested in READ and 
Write DATA, and can ignore the device 
control commands. 

force an internal 
reset of USART 



100 POKE C,64 
110 POKE C,M 



reset mode setting 
see above 
120 POKE C,20 initialize for 
receiving 

The command value 20 above is derived 
from Figure 4 as: 

1) Error Reset (ER = 1 : bit value 16) 

2) Receive ENable (RxEN = 1 : bit value 
4) 

Adding these bit values together we get: 

16 + 4 = 20. Or, 

510 POKE C,64 force an internal 

reset of USART 
520 POKE C,M reset mode setting 

see above 
530 POKE C,49 initialize for 

transmission 



The command value 49 above is again 
derived from Figure 4 as: 

1) Ready to send (RTS = 1 : bit value 32) 

2) Error Reset (ER = 1 : bit value 16) 

3) Transmit ENable (TxEN = 1 : bit value 

1) 

Adding these bit values together we get: 

32 + 16 + 1 = 49. 

Checking the USART Status Read Flags 

The Status Read Flags on the USART 
are set by that unit depending on what 
you have instructed it to do by the last 
command sent to the Control Port. These 
flags are presented at the Control Port 
after a data character has been read, or a 
character transmitted. The problems 
occur here because the Sinclair Basic 
language is limited to testing byte values, 
and the flags are actually separate bits. 

I have been unable to dream up a bit 
checking algorithm in Basic which is fast 
enough to keep up with receiving data, 
even at only 300 BAUD. The labels 
"C" (Control port), and "D" (Data port) 
are as defined in the sample program 
listing, Figure 2. The Basic instructions as 
coded will work perfectly well at 300 
BAUD until there is a transmission error 
(not common at all at that speed). As 
soon as a transmission error occurs, extra 
status bits reflecting the problem are set, 
and the program will loop. At that point. 



WiMMh^MrW.liE 




Now you can organize your copies of 

SYNC 



Magazine binders 



Now your magazines can be a handsome addition to your decor, 
well organized, and easy to find, thanks to these durable li- 
brary-quality cases or binders. They're made of luxury-look 
leatherette over high-quality binder board. And both styles are 
custom-designed for this or any other magazine you save, with 
size, color and imprint selected by the publisher. FREE transfer 
foil included for marking dates and volumes. 

.,» : . CALL 

' "lA &fe TOLL-FREE 24 HOURS: 800-345-8112. 
*V-** On PA only 800-662 2444 I 

^ rs7 nc 1 

■M | PO Box 5120 Philadelphia, PA 19141 

II J I Please send: fj Cases fj Binders 

1*1 ' QUA', ' 

I Sync 

hold a year's issues on 
; m rods, 

■ $42 95 

■ 



Open-back cases 




:i llVld- 

for $19 75. 6 for $37 5 : 
nrlesOKfor qua 



Olher 



[j PAYMENT ENCLOSED $_ 





$1 00 per ordi 

SA add $2 50 per unit ordered; send US 

CHARGE (Minimum $10) 

g American Express [J M 
V,sa 



Card No _ 
Signature- 



-Exp Dale- 



Print ' 
Addr< ; 



Ci'v 

State/Zip 

'Residents of PA add 6% 



J 



THE DIGGLES KITCHEN 

NEW - UNIQUE SOFTWARE FOR THE 

ZX81-16K 



Original recipes from simple suppers to celebration dinners, compiled by 
John and Angela Diggle for Micro Computer Software UK. 

Cassette 1 . 28 WORLD WIDE RECIPES including traditional 
English dishes like - Lancashire Hot Pot 

Steak and Kidney Pie. 

Cassette 2. 26 EUROPEAN RECIPES including main meals, 
vegetables and desserts like - 

Braised Steak in Guinness 
Courgettes Natural 
Crepes Suzette 

Cassette 3 28 EVERYDAY FAMILY MEALS. Looking for 
something different but inexpensive? like - 
Onion Soup Gratinee 
Lamb Stew 
Stuffed Marrow 

Available soon Cassette 4 - Indian Cookery and Cassette 5 - Chinese 
cookery You can build up a world wide cookery book of original recipes 
on cassettes 

Price per Cassette - ONLY $9.99 a most acceptable Christmas 

gift 

Send your remittance to - THE DIGGLES KITCHEN 

MICRO COMPUTER SOFTWARE UK 
UNIT D.6 PEAR INDUSTRIAL ESTATE, 
STOCKPORT RD, LOWER BREDBURY, 
STOCKPORT SK6 2BP. ENGLAND. 
Please add $2 per order tor air mail 



November /December 1982 



95 



Figure 3. 82S1 USART Mode Instruction Format. 



D7 

128 

eo 

S2 



D6 D5 

64 32 

40 20 

SI EP 



D4 D3 D2 

1 6 08 04 

1 08 04 

PEN L2 LI 



Dl DO Bit Number 

02 01 Value (decimal) 

02 01 Value (hex) 

B2 Bl Label 



S2 SI MEANING L2 LI MEANING 

Invalid 5 bits 

1 1 stop bit 1 6 bits 

1 1 1/2 stop bits 10 7 bits 
1 2 stop bits 1 1 8 bits 



PEN MEANING 
1 Enable 
Disable 



EP MEANING 

1 Even parity 

Odds parity 



B2 Bl MEANING 

invalid 

1 data clock / 1 

1 data clock / 16 
1 1 data clock / 64 



— Figure 4. 82S1 USART Command Instruction Definition. 

D5 D4 D3 D2 Dl DO Bit Number 

16 08 04 02 01 Value (decimal) 
10 08 04 02 01 Value (hex) 



D7 D6 

128 64 

80 40 20 

EH IR RTS ER SBRK RxEn DTR TxEN Label 



EN ; not used (synchronous mode only). 
IR i Internal Reset. 

1 = reset the USART control port. 
RTS ; Ready to Send modem control . 

(not required) 
ER ; Error Reset (the USART will still run with errors) 

1 = reset error status -flags. 
SBRK ; Send BReaK (to interrupt incoming transmission; 
used only in sophisticated time sharing type 
applications only). 

1 = send break. 
RxEN ; Receive ENable. 

1 ■ get ready to receive data. 
DTR j Data Terminal Ready modem control. 

(not required) 
TxEN j Transmit ENable. 

1 ■ get ready to send data. 



% 



nothing else will happen, and you will 
have to thump on the BREAK key. and 
rerun the program. 

Receiving data: 

210 IF PEEK C=133 THEN GOTO 
210 

220 LET X$=X$+CHR$ (PEEK D) 

Line 210 waits for the incoming char- 
acter and loops itself until "RxRDY" 
(Figure 5) is turned on by the USART. 
The initializing of the USART will always 
result in a value of 133 for the flags (DSR. 
TxMT, and TxRDY) when in receive 
mode— a total value of 133. 

Line 220 gets the received character 
value and is executed when something 
happens (either a valid character was 
received or an error condition posted). 
Since speed is of the essence at this point, 
to avoid data overrunning your program, 
the best bet is to ignore checking the 
error flags entirely and depend on the 
screen display alerting you to the error. 
Now that the Data Port (PEEK D) con- 
tains the received character, you can do 
with it what you want (always bearing in 
mind that you do not have any time to do 
anything much with it). If you write your 
terminal program in assembler or machine 
code you can do an incredible amount of 
processing between characters at 300 
BAUD. 

Transmitting Data: 

700 IF PEEK C=133 THEN GOTO 
700 

710 POKE D,Y 

Line 700 waits for clear status. 

Line 710 transmits the character value 
to Data Port. 

In this example, we wait for the ready 
to transmit flags to be posted by the 
USART in the Control Port. The value 
133 is again derived from the total of 
DSR, TxMT and TxRDY. When (and if) 
this set of flags and no others are set, we 
proceed to line 710, which places the 
value of the character to be transmitted 
(in operator label "Y") into the Data Port. 
As soon as your program does that, the 
USART will turn off flag TxRDY, and 
possibly TxMT until it has disposed of 
the data character, at which time it will 
turn the two flags back on again ready for 
the next character. (Your Basic program 
will be hard pressed to keep up with this 
sequence of events, but there are no time 
constraints when you are the sender.) 

Adding RAM 

Figure 6 shows a circuit diagram for 
adding extra RAM to your Sinclair by 
using the Chip Select lines which are not 
required for the USART circuit. Again, 
this follows the example from David 
Sommers' article "Experiments in Mem- 
ory and I/O Expansion." I have shown 
only a 2K x 8 bit 2016 which is addressed 
as locations 17,408 to 19,455. The same 
principle applies for adding extra RAM 

SYNC Magazine 



D7 


D6 


128 


64 


80 


40 



Figure 5. 8251 USART Status Read Definition. 

D5 D4 D3 D2 Dl DO 



16 

10 



08 
08 



04 

04 



02 
02 



01 
01 



DSR SYNDET FE C)E PE TxMT RxRDY TxRDY 
DSR 



Bit Number 

Val ue (deci mal ) — Figure 6. Additional RAM Wiring Diagram. 

Value (hex) 
Label 



; Data Set Ready. 

1 = modem is up. 
SYNDET ; Break received. 

1 = break was received. 
FE ; Framing Error. 

1 = invalid character received; probably timing. 
0E ; Over-run Error. 

1 = data was received -faster than your program 
accepted it; data was lost. 
PE ; Parity Error. 

1 = transmission error, or parity differs between 
send and receive circuits. 
TxMT ; Transmitter elipTy. 

1 = buffer ready to send another character. 
RxRDY ; Receive buffer ReaDY. 

1 = received data character ready to be accepted 
by CPU. 
TxRDY ; Transmitter ReaDY to accept another character. 
1 = ready to send another character. 



PIN USE (USART) 

3 * Received data 
2 * Transmit data 
1 * Signal ground 
7 * Signal ground 
6 Data Set Ready 
5 Clear to send 

20 Data Terminal Ready 

4 Ready to Send 



Figure 7. RS-232 Standard for 25 pin "D" connector. 

CONNECT TO 



pin 1 on 1489 
pin 11 on 1488 
CPU ground 
CPU ground 
pin 4 of 1489 
pin 10 of 1489 
pin 8 of 1488 
pin 6 of 1488 



1) The pins marked with an asterisk <*) are required, the 
others are optional, but may, if omitted, cause error conditions 
to be posted by the USART. 

2) This pin configuration is for a male ""D'' connector, 
which assumes that the Sinclair is to be attached to a standard 
RS-232 modem. 

Figure 8. ASCII Terminal Control Characters. 

DESCRIPTION 

Carriage Return: usual end of message code 
Line Feed: sometimes precedes CR 

Null data: used after LF for timing 

Standard protocol when a computer is communicating with a 
terminal is to conclude each line of data with: 

1) A carriage return <CR) to move the cursor back to the 
left hand side of the screen or carriage. 

2) A line feed <LF) to scroll the screen up 1 line, or 
advance the paper 1 line. 

3) One or more nulls (8 hex zeroes) — these are only to give 
a mechanical terminal time to finish returning the carriage for 
the next line. 



ID 


HEX 


DEC 


CR 


0D 


13 


LF 


0A 


10 


NULL 


00 


00 



\ 




fa, 






■ ■ 

lit! 


jio Ki.y /t m , 


-\ 


^ v ' 


3 :i»r , 


"U. 


>n 






M 


«. M 












^ * ! 


> 




*. M 


> 




^. *■' 


" 






1 1 M 






10 Dl 






j Dii 






1 






11 


1 



modules beyond this range, just use the 
Chip Select lines in order as they are 
numbered so you do not leave any "holes" 
in the RAM addresses. I used 
TMM2016P-1 chips by Toshiba, but any 
high-access speed similar chips will do as 
well. (The 2016P-1 has a 100 nano-second 
access time). 

These are extremely simple to wire: 
the address and data pins of the chip go 
straight to the identical pins on your plug 
for the back of the CPU, the two Chip 
Select lines (because this is a 2K chip) are 
combined with a 74LS08 and thence to 
the Chip Select pin of the RAM IC, and 
power and ground as appropriate. The 
entire wiring operation only takes about 
15 minutes. 

Testing the chip to see that it is opera- 
tional is just as simple. First, double check 
your wiring (these are $10 chips), then 
fire up the Sinclair, with the chip OUT of 
the socket. PEEK location 16389 and 
remember the value. Power off the 
Sinclair, press the IC into the socket (right 
way round, of course), and again power 
up the Sinclair and PEEK the same loca- 
tion. If everything is correct, you should 
notice a slightly longer delay before the 
cursor shows on the screen as the ROM 
routines check out the new core, and 
location 16389 should contain a value 8 
higher than the value you noted 
previously. (This location incidentally, is 
where the ROM power-up routines save 
the address of the last useable byte of 
memory). 

If this is not the case, verify the wiring 
again, especially the Chip Select lines. 
Try POKEing and PEEKing various 
locations inside the address range of the 
new chips. See if the POKEd values act- 
ually remain in memory, or if they change 
in a regular sequence (data lines crossed). 
Crossed address lines will result in POKEd 
values going to another location in the 
address range which is harder to pin 
down. If there is no power to the chip, 
the address locations will reflect back 
either "0" or "255". H 



November/December 1982 



97 



8KROM 
IK RAM 



Building Heat Load 

John E. Reinhardt 



Although energy conservation has be- 
come a buzz word in recent years, we are 
constantly reminded of the need to con- 
serve energy by our monthly electric and 
heating bills. We are urged to upgrade 
our home energy systems by buying more 
insulation, adding solar heating, and in- 
stalling more efficient electric and heating 
equipment. 

Making such choices requires taking 
many variables into account if we are to 
avoid ending up spending more money to 
upgrade than the upgrading will save. This 
article gives a program for calculating 
your building heat ioad. You may not 
find all the answers, but you can get a 
preliminary comparison of some of the 
options. 

The program is designed to find the 
heat load by solving two equations. 

The first equation is 

Q- 4 AAT 

where 

— Heat flow rate (Btu per hour). 

R = Heat flow resistance (hour x 
square feet x degrees Fahrenheit divided 
by Btu). 

A = Area of walls, ceiling, etc. (square 
feet). 

AT = Average temperature difference 
between the inside of the wall and the 
outside (degrees F). 

The second equation is 

Q= pVCpATL 
where 

Q = Heat flow rate (Btu per hour). 

P = Density of air (0.075 16 per cubic 
foot). 

V = Air infiltration rate (cubic feet per 
hour per feet of crack). 

Cp = Specific heat of air (0.24 Btu per 
pound). 



John E. Reinhardt, 230 Pine Ridge Rd.. Madison. 
AL 35758. 




AT = Average temperature difference 
between inside air and outside air 
(degrees F). 

L = Crack length (feet). 

The variables needed to run the pro- 
gram are as follows: 

TI = Average inside temperature (de- 
grees F). 

T = Average ground temperature or 
outside temperature (degrees F). 

R = R value of floor, ceiling, walls, or 
windows (hours x square feet x degrees F 
divided by Btu). 



A = Area of floor, ceiling, etc. (square 
feet). 

CL = Crack length (feet). 

IR = Infiltration rate (cubic feet per 
hour per foot). 

Q = Heat load (Btu per hour). 

Table 1 lists the R values for computing 
the heat loss, and Table 2 lists the infiltra- 
tion rate data. 

Enter the program on your computer, 
SAVE it, and then hit RUN and ENTER. 
The program will then ask for the data. 
Your data will appear on the screen. 



Table 1. R Value. 



Material 


Thickness 


Resistance 


Insulation 


3" 


10 


Insulation 


6" 


20 


Insulation 


9" 


30 


Concrete 


6" 


2 


Single Pane 
Window 


— 


0.9 


Double Pane 
Window 


— 


1.7 



Table 2. Infiltration Rate {cubic ft/hr/ft). 



Crack Location 


Wind Velocity, MPH 


5 


10 


15 


20 


25 


Masonery wall 
not caulked 


3 


8 


14 


20 


27 


Masonery wall 
caulked 


1 


2 


3 


4 


5 


Average Window 
non-weatherstripped 


7 


21 


39 


59 


80 


Average Window 
weatherstripped 


4 


13 


24 


36 


49 


Poor Fitted Window 
non-weatherstripped 


27 


69 


111 


154 


199 


Poor Fitted Window 
non-weatherstripped 


6 


19 


34 


51 


71 



98 



SYNC Magazine 






When the screen fills, hit CONT and 
ENTER. Continue adding data as called 
for. The Building Heat Load is the final 
number printed. Analyze each option 
you are considering with this program, 
and then you can decide which option 
will give the results you want. 

The program can be readily expanded 
for 16K RAM. Tables 1 and 2 could be 
listed in the program enabling the user to 
compute the variables. 

The following list of data will enable 
you to try out the program: 

TI = 70 

T (ground) = 50 

T (outside) = 30 

R (floor) = 2 

R (ceiling) = 20 

R (wall) = 10 

R (window) = 1.7 

Crack length = 300 ft. 

Infiltration rate = 13 

A (floor) = 1500 sq. ft. 

A (ceiling) = 1500 sq. ft. 

A (wall) = 1200 sq.ft. 

A (windows) = 200 sq. ft. 

The heat load for this set of data is 
30313.882 Btu/hr. One kw equals 3.413 
times 10 3 Btu/hr. Thus the heat load 
equals 8.88 kw. Given a 30 day period 
and electric heat at a cost of 5 cents per 
kwh, this amounts to $319.68. H 



Listing 1. Building Heal Load Program. 



20 LET OT.NOT PI 

30 PR TNT " INSIDE TEHP "j 

4-0 INPUT TI 

58 PRINT TI 

60 FOR M=SQN PI TO URL "4." 

78 LET N=H+NOT PI 

98 IF H>»INT PI THEN GOTO UAL. 
■•IBB" 

188 IF N.SSN PI THEN PRINT "OR 
UNO TEHP "; 

110 IF NEURI- 
TS IDE TEHP "; 

130 INPUT T 

1*0 PRINT T 

158 IF H-SON PI THEN PRINT 
OR" 

168 IF H=URL "2 
ILINQ" 

170 IF H-INT PI THEN PRINT 
L" 



"2" THEN PRINT "OU 



THEN PRINT 



FLO 
"CE 
URL. 



1S0 

NDOU' 

190 

200 

sie 

320 
230 
248 
258 
268 
270 
280 
290 
300 
310 
320 
330 
340 
350 
360 
' O 



IF H=URL 



THEN PRINT "UI 



PRINT "R UOLUe "; 
INPUT R 

R 

"BRER "; 

R 

R 

LET B=BHTI-T)/R 
LET OT=OT+0 
NEXT M 

PRINT "CROCK LENGTH" 
INPUT CL 
PRINT CL 

"INFIL RRTE" 

IR 

IR 
LET 0=CL#IR* iTI-T) i.BIS 
LET 0=QT+0 
PRINT "HERT LORD. BTU/HR: 



PRINT 
PRINT 
INPUT 
PRINT 



PRINT 
INPUT 
PRINT 



Line notes: 

20 Initialize heat load. 
40 Input building temperature. 
130 Input ground or outside air tem- 
perature. 

200 Input heat conduction terms. 



230 Input surface areas. 
290 Input crack length. 
320 Input infiltration rate. 
340 Compute infiltration. 
350 Sum heat loads. 
370 Printout heat load. 



'At LastVour ChanceTo 
"ruckThe Machine Code 




ZX81 and SPECTRUM OWNERS 

•fc If you are interested in finding out how a computer really works 
and want to experience true programming power -the machine 
Code Test Tool is the answer. 

•fc The Machine Code Test Tool is a utility program which comes 
complete with tutorial course enabling you to enter, test, display 
and debug hexadecimal machine codes simply and quickly. 

% The Machine Code Test Tool is constructed to help the absolute 
beginner who wishes to explore this fascinating subject, or the 
expert keen to polish up his machine code programs. 

^ A HEX: decimal conversion routine is contained within the 
program as standard. 

Post to: R. L. ASSOCIATES, 614 W. Manchester Blvd., Inglewood, Cal. 90301 

I Please rush ZX81.M.C.T.T. at $19.95 ($25.95 Canada) 

Send payment to above address 



NAME 



Tr ade£nq^es 



invited 



■ ADDRESS 

| STATE 

■ Allow up to 28 days for postage 



ZIP. 



R.L.I m 



8KR0M 
16KRAM 



Random Walks 



Eric Chandler 




Most students of statistics are familiar 
with the "Random Walk" problem: A 
person passes through a series of doors 
and after each he is presented with the 
choice of turning right (with fixed prob- 
ability P) or turning left, and thereafter 
encounters another door. If, say, there 
are 9 levels of doors, the possible out- 
comes may be characterized by the num- 
ber of times X he turns right, from X=0 
to X = 8. We can find the probability of 
each of these outcomes by the formula 

Pr(X) = (x") P X (1-P) 8_X 
and the resulting distribution is called 
"binomial." 

The most commonly seen of these dis- 
tributions result when P=%: The so- 
called "bell shaped" carve which can be 
approximated by the normal function 



Y = 



1 



/x=i± 



w 



vyfZR e V °" J/2 
where the mean jji = P and the standard 
deviation 



1 REH ■RHNCOM USLKS'.LINE 3 U 
SES GRAPHICS E. 

* NEXT N „-.„,- 

5 PRINT AT 0,1B, "STHRT. 
RHNDOH" 

6 FOR N=4* TO PS 

7 PLOT N.4-1 
6 NEXT N 

9 PRINT RT 2,25; "UflLKS" 

IB FOR N=S8 TO 59 

11 PLOT N,37 

12 NEXT N 

13 FOR N=l TO 9 
14. LET Y=43-2*N 
16 LET X=2S-3*N 
IS FOR M=l TO N + l 
20 FOR T=l TO 3 
22 LET X=X + 1 

24. UNPLOT X,Y 

26 NEXT T 

28 FOR T = l TO 3 

30 LET X=X+1 

32 PLOT X,Y 

34. NEXT T 

36 NEXT M 

36 NEXT N 

40 FOR N=0 TO S 

4.2 PRINT RT 21,S+3*N,N 

4-4. NEXT N 

4-5 PRINT RT 2B,3B, "X" 

4.6 PRINT RT 1,0, "ENTER PROS." 
2,0; "OF RIGHTO)" 



o- = VP (1-P). 

An exceedingly clever device called 
the "Hexstat" illustrates this distribu- 
tion. A large number of small steel balls 
in a transparent casing roll down 
through a cascade of bifurcated channels 
and collect in 9 columns in the familiar 
bell shape. 

A program "Random Walks" for the 
ZX81 duplicates the Hexstat. It is an 
eye-catching, pretty display and very ef- 
fective as an instructional device. Over a 
period of 15 minutes or so a series of 
"balls" falls down through a cascade or 
sieve to form 9 columns whose heights 
are proportional to the respective proba- 

Eric Chandler. RMWC. Lynchburg, VA 24503. 



4-S PR INT RT 

50 PRINT RT 3,0; "TURN" 

52 INPUT P 

54. PRINT RT 

56 PRINT RT 



1,0; "PROBBBILITY" 
2,0, "OF RIGHTO)" 

58 PRINT RT 3 , 0; "TURN=" , P 

59 LET PR=1-P 

60 DIN RC9) 

61 FOR N=l TO 9 

62 LET R <N) =24. 
64. NEXT N 

65 RRND 

66 LET X=33 

67 LET Y=42 

68 PLOT X,Y 

69 GOTO 84 

70 LET S=SGN (RND-PR) 
72 IF 5=0 THEN GOTO 70 
74. FOR N=l TO 3 

76 UNPLOT X,Y 
78 LET X=X+S 
80 PLOT X,Y 
82 NEXT N 
84 FOR N=l TO 2 
96 UNPLOT X.Y 
88 LET Y=Y-1 
90 PLOT X,Y 
92 NEXT N 

94 IF Y=24 THEN GOTO 98 
96 GOTO 70 

98 FOR N=l TO H((X-3)/6) 
100 UNPLOT X.Y 
102 LET Y=Y-1 
10* PLOT X.Y 
106 NEXT N 

108 LET »IIX-3)/6)=BIIX-3)/6)-l 
110 IF A ( <X-3) /"6> =0 THEN GOTO 1 
14. 

112 GOTO 66 

114. FOR N = l TO 100 

116 NEXT N 

120 FOR L=0 TO £> STEP 2 

122 FOR C=0 TO 29 

123 REH NEXT 2 LINES USE GRRPH I 
CS INU.UID.P.7 RND SPACE , 6 . 



URP! 



124 PRINT RT L.C;" 1^" 

126 PRINT RT L + l.C;' 7 k" 

128 FOR N=l TO 3 

130 NEXT N 

135 REH NEXT LINE USES GRRPHICS 
T. 

14.0 PRINT RT L + l,C+2; - V 

142 NEXT C 

14.4. PRINT RT L,30;" 

146 PRINT RT L+1,30;" 

148 NEXT L 

149 PRINT RT 7,18;"E^" 

150 PRINT RT 8,18; 'V" 

151 FOR N=l TO 50 

152 NEXT N 

153 PRINT RT 8,19; 
154. PRINT RT 6,22; 

155 PRINT RT 7,22; 

156 PRINT RT 8,22; 

162 LET R=0 
164. FOR H = l TO 9 

163 LET A=24.-A<H)+R 
172 NEXT H 

176 PRINT RT 0,0; "THERE UERE "; 
a;" BALLS IN ALL." 

178 PRINT "FOR ERCH OUTCOME X u 
E COMPUTE" 

180 PRINT "THE EXPECTED NUMBER 
OF BRLLS " 

182 PRINT "E (X) BY THE BINOMIAL 
FORMULR RND" 

183 REM NEXT LINE USES GRRPHICS 

184. PRINT "GRRPH UITH THE HISTO 

oBBH B. " 

188 FOR X=0 TO 8 

190 LET N=8 

192 GOSUB 300 

194. LET EF=F 

196 LET N=X 

198 GOSUB 300 

200 LET XF=F 

202 LET N=8-X 

204. GOSUB 300 

206 LET OF=F 

20S LET E=INT (fl* iEP/ (XF*OF) ! » I 
P**X)*((l-P)*i(8-X))+.S) 

210 IF E=0 THEN GOTO 236 

212 IF E = l THEN GOTO 234- 

214. IF E/2<>INT (Ey2) THEN GOTO 

224- 

216 FOR Y=21 TO 22-E/2 STEP -1 

5 17 REM NEXT LINE USES GRAPHICS 

n 

218 PRINT RT Y , 3* (X + l ) ; "*" 

220 NEXT Y 

222 GOTO 236 

224 FOR Y=21 TO 22-IE-1I/2 STEP 

226 REH NEXT LINE USES GRAPHICS 

A. 

226 PRINT AT Y , 3» tX+1) ; "«" 

228 NEXT Y „ „ 

230 PRINT RT 22- (E+l) /2 , 3» (X+l) 

232 GOTO 236 

233 REH NEXT LINE USES GRAPHICS 
D 

234. PRINT AT 21 ,3» IX*1) ; "»" 

236 NEXT X 

286 STOP 

300 LET F=l 

301 IF N=0 THEN RETURN 

302 FOR H=l TO N 

303 LET F=F*M 

304 NEXT M 

305 RETURN 



100 



SYNC Magazine 



bilities of the outcomes. When the tallest 
column reaches the bottom of the sieve 
the process stops. By entering different 
values of P at the beginning of the pro- 
gram, distributions skewed right or left 
may be produced. A typical display at 
this point is shown in Figure 1. 

After a short pause (whose duration 
may be adjusted at line 1 14) the program 
continues. The top part of the display is 
eaten up by a little gobbler who finishes 
it off with a humorous embellishment. 
The total number of balls involved is cal- 
culated and the expected number of balls 
in each outcome is computed by the bi- 
nomial formula and displayed in a con- 
trasting histogram alongside the actual 
outcomes. 

To execute the program after it is en- 
tered or loaded, hit RUN, and the fixed 
part of the display will be drawn. The 
program then asks for the probability of 
a right turn (your right) and a number 
between and 1 inclusive is entered. The 
rest of the program runs without 
interruption. 5 



Figure 1. 



THERE UERE 73 BRLLS IN «LJ_» 
FOR ERCH OUTCOME X UE COMPUTE 
THE EXPECTED NUMBER OF BALLS 
E<X) BY THE BINOHIftL FORMUL.H RND^ 
GRAPH UITH THE HISTOGRAM «. 




STOCK MARKET 

PRICE 

ANALYSIS 

HELP! for the 
Small Investor 



Now SINCLAIR ZX-8 1 ( 1 6K) owners can do what the professional market traders 
do — use a computer to predict once direction This program tracks up to six stocks. 
averages, or commodities, and produces graphs and uses technical indicators to 
help you make trades 

Technical analysis is based on two ideas first, that the market, like the rest of 
human behavior, repeats itself; and second, that there are professionals and in- 
siders who know what the market is going to do before everyone else does . and who 
place trades in a way that is hardly noticeable TECHNICAL ANALYSIS attempts to 
read the price action and volume figures to determine whether predicabie patterns 
are developing, and what the professionals are doing 

Professional traders have been using computers to make this kind of analysis for 
years, because the manipulation of the data is very complicated and time- 
consuming With this program, you let the computer do the work, and its signals 
become a powerful investment tool. 

The program makes GRAPHS of the daily pnces. of two moving averages, and of 
a volume indicator A booklet that comes with the program helps you learn what to 
look for 

The program does an ANALYSIS to signal trend-formation and tum-arounds It 
gives a score for each indicator, and a total score, to help you see whether there is 
confirmation among the signals. 

USE THIS TO TRADE STOCKS. OPTIONS. AND THE NEW STOCK INDEX 
FUTURES!! 

This gives POWER TO THE SMALL INVESTOR! 

For program tape and booklet send $30 00 to 

MOOTER STOCK PROGRAM 
320 East 25th Street 

New York. NY. 10010 

(NY. residents, add $2.48 sales tax.) 



cURPf 




50 NIFTY 1K 

PROGRAMS FOR 

THE ZX81 

A large variety of great games, interesting activi- 
ties, and plenty of graphics, providing hours of fun 
for the whole family. 

Also available 

50 nifty programs 

for your 

Timex Sinclair 1000. 

Same great programs, but upgraded for 2K 
machine. The result is very user friendly with 
additional levels of play. 

$9.95 each includes 
postage/handling 

Listings and cassettes available: 
send sase for free catalogue. 

JENN PRODUCTS 

BOX 246 

HARRISON, ME. 04040 



November/December 1982 



101 



8KROM 
IK RAM 



Part 2 

Block Transfers: Variables Transfer 

John Hoagland-Scher 



The Problem of Saving Variables 

One drawback of Timex/Sinclair com- 
puters is that LOADing a program erases 
any data that you have in the variables 
area to make room for in-coming vari- 
ables. However, the program developed 
here allows you to keep variables in the 
machine safe from NEW, CLEAR, and 
LOAD. Furthermore, it allows you to 
transfer variables from one Basic program 
to another. This spares you the effort of 
re-entering a data base in each new pro- 
gram that you wish to use it in. You can 
even combine data stored in several dif- 
ferent programs into a single data base, a 
facility you may desire should you up- 
grade your computer with additional 
memory. The heart of the Variables 
Transfer routine consists of block trans- 
fers to and from the space above RAM- 
TOP of the sort we began exploring in 
Block Transfers, Part 1, in the last issue. 

Those of you who completed Part I 
will have an easier time understanding 
the workings of the machine code pre- 
sented here. However, even if this is your 
first attempt at a machine language pro- 
gram, you can cook-book your way 
through without much trouble. Chapters 
24 through Appendix A of the Sinclair 
manual or Chapters 23 through Appendix 
A of the Timex/Sinclair manual and Dr. 
Ian Logan's article "An Introduction to 
Machine Language" are useful, but not 
essential references. (See SYNC 1:6 or 
the SYNC special issue.) 

The Variables Transfer Routine 

Because Timex/Sinclair users now have 
anywhere from IK to 56K of RAM, the 
Variables Transfer routine was written so 
that it will operate at any location in 
memory. In fact, the program modifies 
itself according to where it is located in 
memory, and according to how large the 
variables are that you wish to transfer. 
You do not have to change a single byte. 

As in Part 1, the block transfers used 

John Hoagland-Scher. 222A Hamilton St., 
Cambridge. MA 02139. 



here employ the LDIR instruction of the 
Z80(A). Recall that LDIR uses three reg- 
ister pairs, BC, DE, and HL, in the follow- 
ing way. Initially the BC pair holds the 
number of bytes (#bytes) to be transfer- 
red, the DE pair holds the first address of 
the destination block of memory (dest'n) 
to which information will be transferred, 
and the HL pair holds the first address of 
the block of information that you wish to 
transfer (source). The LDIR instruction 
transfers the contents of the address held 
in the HL pair to the address held in the 
DE pair, then it increments (adds 1 to) 
HL and DE, and decrements (subtracts 1 
from) the BC pair. It then compares BC 
to zero,, and if BC is not equal to zero, 
the instruction is repeated. Otherwise the 
next instruction is executed. Thus the BC 
pair is a count-down register which reach- 
es zero when the entire block has been 
transferred. Examine the blocks labeled 
A, C, F, and G in Figure 2. For now just 
look at column 5. Each of these blocks is 
a block transfer routine illustrating the 
use of the three register pairs and the 
LDIR instruction as just described. I will 
explain more about these blocks, and 
about how the program modifies itself 
later. Right now we should get down to 
business. 

An Overview of the Process 

In summary, what we will do is load a 
machine language routine into the space 
above RAMTOP, then transfer it to a 
SAVEable REM statement for future 
use. Then we will put it back up above 
RAMTOP and illustrate its uses with a 
pair of simple Basic programs. Before 
beginning you must reserve enough space 
above RAMTOP to accomodate the Var- 
iables Transfer routine (block D, figure 
2), along with blocks A and C which will 
eventually be dispensed with. To do this, 



change RAMTOP to 17302 by typing 
POKE 16388,150 and ENTER, then 
POKE 16389,67 and ENTER, then hit 
NEW. Even if you have additional mem- 
ory, you must load the machine language 
into the addresses in column 1 in Figure 2 
initially, although this will not restrict 
future use of the program, so set RAM- 
TOP to 17302 as above. 

Beginning with Hex Loading 

Now enter the hex loading program 
shown in Figure 1. This program is iden- 
tical to the loading program that we used 
in the last issue, with the exception of the 
address in line 280, 17302. When you RUN 
this program, the screen will prompt you 
for a byte in hexadecimal. Begin entering 
the bytes listed in column 4 in Figure 2 
(i.e., enter two digits from the column at 
a time as follows: type 01 and ENTER, 
then 5C and ENTER, 00 and ENTER, 11 
and ENTER, and so on until you have 
finished entering the entire column, then 
type END and ENTER). Note that the 
program gives you a back-space key, '/', 
in case you ENTER the wrong byte. Re- 
member also that in a hexadecimal listing 
like that shown in column 4, Figure 2, is 
always a zero and never the letter 0. 

Once you type END and ENTER, you 
can check to see that you did not leave 
any bytes out by typing PRINT PEEK 
17405. The number 201 should appear on 
your screen (201d = C9h). Now SAVE 
the hex loading program for future use, 
then type NEW and ENTER to clear but 
the memory. Put the machine into FAST 
mode and enter a REM statement with 92 
Xs (i.e., type 1 REM XXXXX . . .etc., 
then ENTER). You can change back to 
SLOW now. Note that the first X in the 
REM statement is at the address 16514. 
Now look more closely at block A, 
column 5 and 6 of Figure 2. Convince 



102 



SYNC Magazine 



yourself that block A transfers block B 
from the addresses in column 1 to the 
addresses in column 2, the REM state- 
ment addresses. Call the routine in block 
A by typing RAND USR 17302 and 
ENTER, then ENTER again. Your REM 
statement should now contain the char- 
acter representation of the bytes in block 
B (see Appendix A of your manual). The 

Figure t . 



1 REM FROM BOOTH, SYNC VOL.2, 
NUMBER 1 
200 LET V=-l 
210 LET V=V+1 
220 IF INT (V/50)*50=V THEN CLS 

230 INPUT H$ 

240 IF H$="" THEN GOTO 230 
250 PRINT H$i"#"; 
260 IF H$="END" THEN STOP 
270 IF H$="/" THEN GOTO 300 
280 POKE 17302+V,l6*C0DE (H$)+C 
ODE (H$(2))-476 
290 GOTO 210 
300 LET V=V-1 
310 GOTO 230 



last character in the REM statement 
should be TAN if all has gone properly. If 
your REM statement remains full of X's, 
you had better PRINT PEEK a few 
addresses between 17302 and 17313 to be 
sure that you entered block A properly. 

Now that the Variables Transfer rou- 
tine is in a SAVEable REM statement, 
SAVE it under a name such as 
"VARIABLES TRANSFER" or some suit- 
able shorter mnemonic. Be sure your 
SAVE was successful. 

Using over IK RAM 

At this point those of you with more 
than IK RAM can begin to take advant- 
age of it. The demonstration programs in 
Figures 3 and 4 require about 115 bytes 
above RAMTOP, but so that you can try 
out larger applications, reserve 156 bytes 
above RAMTOP by typing POKE 
16388,100 and ENTER, then POKE 
16389,67 and ENTER, then NEW. If you 
have additional memory, you may want 











IU 1C5C1V 

Figure 2. 


c several nunureu nytes at 


tne 




HIM 












Loading Slalemen 


Operating Object 








Addresses Addresses 


Addresses Code 


Instruction 


Comment Blocks 


17302 






015C00 


LD BC,#bytes 


005Ch=92d 




17305 






118240 


LD DE.dest'n 


4082h=l65l4d 




17308 






21A243 


LD HL, source 


43A2h=173l4d 


A 


17311 






EDB0 


LDIR 


blk B transfer 




17313 
1731^ 


16514 




C9 


RET 


return 






014F00 


LD BC ,#bytes 


004Fh=79d 




17317 


16517 




218F40 


LD HL, source 


408Fh=l6527d 




17320 


16520 




ED5B0440 


LD DE, (dest'n 


) 4004h=RAMT0P 




17324 


16524 




EDB0 


LDIR 


blk D transfer 




17326 


16526 
16527 1 




C9 


RET 


re turn 




17327 


?AMT0P 


DDE 5 


PUSH IX 


save initial IX i 




17329 


16529 


+2 


2A0440 


LD HL,(4004) 


RAMTOP in HL : 1 




17332 


16532 


+5 


E5 


PUSH HL 


HL to IX 11 




17333 


16533 


+6 


DDE1 


POP IX 


RAMTOP in IX 11 




17335 


16535 


+8 


014F00 


LD BC.004F 


004Fh=79d 1 1 




17338 


16538 


+11 


09 


ADD HL.BC 


addr.of blk Z H i 




17339 


16539 


+12 


DD753A 


LD (IX+3A),L 


dest'n to blk F 1 1 




173^2 


16542 


+15 


DD743B 


LD (IX+3B) ,H 


dest'n to blk F t 1 




17345 


16545 


+18 


DD75^A 


LD (IX+4A) ,L 


source to blk G 1 1 




173^8 


16548 


+21 


DD744B 


LD (IX+4B),H 


source to blk B 1 i 




17351 


16551 


+24 


E5 


PUSH HL 


save addr.blk Z 




17352 


16552 


+25 


2A1440 


LD HL,(40l4) 


40l4h=E LINE 1 1 




17355 


16555 


+ 28 


ED4B1040 


LD BC,(4010) 


4010h=VARS 1 ! 




17359 


16559 


+32 


ED42 


SBC HL.BC 


E_LINE-VARS i i 




17361 


I6561 


+34 


2B 


DEC HL 


variable space I E I 




17362 


16562 


+35 


DD7537 


LD (IX+37),L 


#bytes to blk F 1 1 




17365 


16565 


+38 


DD7438 


LD (IX+38) ,H 


#bytes to blk F 1 1 




17368 


I6568 


+4i 


DD7543 


LD (IX+43) ,L 


#bytes to blk G 1 1 




17371 


16571 


+44 


DD7444 


LD (IX+44) ,H 


#bytes to blk G i 1 




17374 


16574 


+47 


CI 


POP BC 


addr.of blk Z 1 1 




17375 


16575 


+48 


09 


ADD HL.BC 


last addr.blk Z J 1 




17376 


16576 


+49 


E5 


PUSH HL 


HL to BC 1 : 




17377 


16577 


+ 50 


CI 


POP BC 


last addr.blk Z 1 : 




17378 


16578 


+51 


DDE1 


POP IX 


restore intl.IX : 




17380 

17381 


16580 

16581 


:s 


C9 


RET 


gives end blk 7, 1 




010000 


LD BC,#t„ 


variable space 1 1 




17384 


16584 


+57 


110000 


LD DE.dest'n 


addr.of blk Z 1 1 




17387 


16587 


+60 


2A1040 


LD HL, ( source ^ 


4010rr=VARS F 1 




17390 


16590 


+63 


EDB0 


LDIR 


blk transfer 1 1 




17392 
17393 


16592 
16593 


+65 

+66 


C9 


RET 


return 1 s 




010000 


LD BC,#bytes 


variable space 1 1 




17396 


16596 


+69 


ED5B1040 


LD DE, (dest'n) 


4010h=VARS 1 1 




17400 


16600 


+73 


210000 


LD HL, source 


addr.of blk Z G 1 




17^03 


16603 


+76 


EDB0 


LDIR 


blk transfer 1 1 




17405 


1660 5 


+78 


C9 


RET 


return i s 








+79 




The size 
user defined, 
for variable s 


of this block is 

It is the area used 
torage above RAMTOP, 


Z 


, 








safe during NEW. LOAD, and CT.EAR. 


I 





top of your RAM. LOAD "VARIABLES 
TRANSFER" and type RAND USR 
16514. The USR 16514 entry calls the 
block C routine. Look again at Figure 2 
and convince yourself that block C trans- 
fers block D from the addresses shown in 
column 2 to the addresses shown in col- 
umn 3, the Operating Addresses (note 
that the DE register pair is loaded indi- 

Figure 3. 



November/December 1982 



1 REM CRAMT0P 
10 DIM A(3) 
20 DIM A$(3) 

30 LET P=PEEK l6388+256*PEEK 1 
6389 

40 PRINT "HAVE YOU RESERVED AT 
LEAST#"jUSR P-P;"##BYTES ABOVE 
RAMTOP?" 
50 STOP 

60 PRINT "A(3)","A$(3)" 
70 FOR N=l TO 3 
80 INPUT A(N) 
90 PRINT A(N) , 
100 INPUT A$(N) 
110 PRINT A$(N) 
120 NEXT N 
130 RAND USR (P+54) 
140 PRINT "NOW TYPE NEW, THEN L 
0AD RESTORE. " 



rectly from the systems variable; 4004h 
= 16388d). The Variables Transfer rou- 
tine is now safely above RAMTOP, and 
you should type NEW to clear out the 
memory. 

Trying the Application Program 

Enter the sample application program 
in Figure 3 (named in reference to the 
fact that I am still working with a IK 
machine). When you RUN this program, 
line 40 checks to see how big the variables 
are that you set aside in earlier lines and 
asks you to confirm that there is sufficient 
space above RAMTOP for this amount 
of variable space, and in addition, for the 
Variables Transfer routine, block D. Be- 
cause the routine in line 40 uses a set of 
registers that are also used for generating 
the display, some users have found that 
they must run the machine in FAST mode 
to avoid crashing the system. Conserv- 
ative advice would be to add the following 
lines: 

35 FAST 
45 SLOW 
The variable space above RAMTOP will 
be referred to as block Z from now on. 
Line 40 also lets you determine which 
variables will be transferred, although 
nothing is transferred as of yet. Arrays 
DIMensioned in earlier lines, such as A(3) 
and A$(3), and simple variables such as P 
will be transferred while variables intro- 
duced in later lines, such as N in line 70, 
will not be transferred. 

RUN the program, confirm that you 
have reserved adequate space, then type 
CONTinue and ENTER. The screen will 
prompt you for a number and then a 
letter. This will happen three times for a 
total of six items. Enter anything you like, 

103 



or just type 7 and ENTER, X and ENTER, 
8 and ENTER. Y and ENTER, 9 and 
ENTER, Z and ENTER. You have now 
loaded the arrays that were DIMensioned 
in lines 10 and 20, and the computer has 
now transferred those two arrays and the 
variable P to block Z. The transfer was 
executed by line 130, RAND USR (P3+4) 
which calls the block transfer routine in 
block F. Look again at blocks F and G in 
Figure 2. Block F transfers variables and 
arrays into block Z, and block G transfers 
block Z back down into the variables 
area of the same, or a different, Basic 
program. 

The screen should now be telling you 
to type NEW and ENTER, then LOAD 
and "'RESTORE", the program in Figure 
4, so go ahead. You may actually want to 
SAVE "CRAMTOP" first for future ref- 
erence. Note that the first three lines of 
RESTORE are identical to the first three 
lines of CRAMTOP. This is a necessity 
because space must be created in a Basic 
program before information can be trans- 
ferred from block Z into the program. 
Line 40, RAND USR (P3+6) then calls 
the block G routine which performs the 
transfer. The rest of the program simply 
prints your arrays. RUN the program. If 
you entered 7, X, 8. Y. 9, Z, in CRAM- 
TOP, these numbers should now appear. 
If they do not appear, recheck 



Figure 4. 



1 REM RESTORE 




10 DIM A(3) 




20 DIM A$(3) 




30 LET P=PEEK 


l6388+256*PEEK 1 


6389 




*K> RAND USR (P+66) 


50 PRINT "A(3) 


","A$(3)" 


60 FOR N=l TO 


3 


70 PRINT A(N) , 


A$(N) 


80 NEXT N 




Figure 5. Sample Calculations of (he Bytes Used 


li> Shirt- Thrpp l\ pes of Variably. 


Variable Type 


Bytes Used 


Simple Variables 




LET P= 


1+5 


LET PI= 


2+5 


LET P0P= 


3+5 


Numerical Arrays 




DIM A(m) 


l»2+l++5*m 


DIM A(m,n) 


2*2+if+5*m*n 


DIM A(m,n,p) 


3»2+J++5*m*n*p 


Character Arrays 




DIM At (m) 


l*2+4+m 


DIM AS(m,n) 


2*2+*H-m*n 


DIM A$(m,n,p) 


3*2+4+m*n»p 



RESTORE, then SAVE it, then recheck 
CRAMTOP, and, if neither of these pro- 
grams contains an error, go back to 
square one. If you made it this far success- 
fully, you deserve a round of applause. 



The Steps of the Variable Transfer 
Routine 

Let me now summarize the steps you 
must go through to use the Variables 
Transfer routine in your own applications. 

1) You must decide how much space 
you need to reserve above RAMTOP. 
Figure 5 contains formulas that are likely 
to be useful for this. In the case of CRAM- 
TOP, A(3), A$(3), and P take up 21 +9 
+6=36 bytes. Add this to the 79 bytes 
required to hold block B, and you will 
understand why CRAMTOP asked you if 
you had reserved at least 36+79=115 
bytes. Reserve adequate space above 
RAMTOP (see chapter on the organi- 
zation of memory or storage in your 
manual). 

2) LOAD the Variables Transfer rou- 
tine, then type RAND USR 16514 and 
ENTER to transfer it above RAMTOP. 

3) DIMension arrays and assign vari- 
ables that you will later want to transfer 
at the beginning of your Basic program as 
we did in CRAMTOP. 

4) Call the block E routine, USR P, as 
we did in line 40 of CRAMTOP. There 
are several ways you can do this to obtain 
slightly different information. 

PRINT USR P gives the last address in 
block Z. This must be smaller than the 
last address in your RAM, of course, or 
else you will lose your data. 



ARIES 

SPACE SIMULATION GAMES 

ZX-8I/TIMEX 1000 I6K 

BLACK HOLES 

NAVIGATE YOUR STARSHIP THRU 
GRAVITATIONAL FIELDS OF FOUR 
BLACK HOLES TO REACH YOUR 

HOME PLANET SAFELY 
A NEW SITUATION EVERY TIME 

LINK UP 

LAUNCH YOUR SHUTTLE AND CONTROL 
ROCKET BURNS TO LINK UP WITH 
SKYLAB. ACTUAL SIMULATION OF 

GRAVITATIONAL FIELDS, TRUE 
ELLIPTICAL ORBITS, DISPLAY OF 
ORBITAL PARAMETERS, AND 
CHOICE OF DISPLAY MODES 

BOTH GAMES ON ONE CASETTE $12.00 
SEND CHECK OR MONEY ORDER TO: 

ARIES ASSOCIATES 
511 MARY AVE. 
HUNT. VALLEY, PA 19006 



16K INSIDE?!! 




No Bulky Add-ons! 
Leaves back connector free 
for printer or peripherals! 
Inexpensive using your parts. 

Can be assembled and installed by 
anyone who can use a soldering pen. 
Complete instructions, including 
schematic, parts Bst, suggested 
Board layout, assembly and instal- 
lation. $7.95 

With optional pre-made P.C. Board, 
ready for assembly. $18.95 from: 

Independence Research 

P.O. Box 1497 

Orem, Utah 84057 



104 



SYNC Magazine 



PRINT USR P-P gives you the number 
of bytes that you must reserve above 
RAMTOP, as in line 40 of CRAMTOP. 

PRINT USR P-P-79 gives you the num- 
ber of bytes required in block Z, and thus 
allows you to check your calculations 
from Figure 5. 

One of these three choices must go in a 
line like line 40 of CRAMTOP, even if 
you already know the answer it will re- 
turn, because USR P sets up blocks F and 
G for the transfer. 

5) Use any other variables that you 
need to in your Basic program after you 
call USR P. These will not be transferred. 
Then call USR (P3+4) once the arrays 
that you want to transfer are filled. 

6) LOAD the program that you want to 
transfer your variables to, and DIMension 
arrays and assign variables at the begin- 
ning of the program that you wish to 
restore to the program. Do not forget P. 
Then, before any other variables are 
introduced in the program listing, insert a 
line containing RAND USR (P3+6). See 
the RESTORE program again if you are 
confused about this step. When you RUN 
the program, your arrays and variables 
will be written in from block Z. 

Protecting Your Variables 

RUN, CLEAR, LOAD, and NEW all 
possess the ability to erase variables that 
it may have taken you hours to type into 
the machine. You can employ one safety 
measure in the portion of any Basic pro- 
gram that serves to load a large array. 
You add a line which calls USR (P3+4) 
after each data point is entered. Each 
time that you call USR (P3+4) the data 
previously transferred will be written over 
identically, and the current entry will be 
added to block Z. Then if you hit one of 
the four functions above, just type RAND 
USR (P3+6) and the data will be restored. 
In the case of NEW, you will, of course, 
have to load your Basic program over 
again before restoring the data. 

For example, add this feature to 
CRAMTOP by moving line 130 into the 
FOR-NEXT loop. Type 115 RAND USR 
(P3+4) and ENTER. An occasional 
SAVE is also a good idea to protect your 
data from power failures. 

If you think you have the hang of Vari- 
ables Transfers, you are now ready for 
your next crack at machine language. 

The Problem of Fixed Addresses 

Many machine language routines for 
the Sinclair computer are written so that 
they will work properly only if they are 
located at a fixed starting address. This 
might at first seem to be a requirement in 
programs which draw upon specific ad- 
dresses within the routine for the infor- 
mation stored at those addresses. A fixed 
starting address might also seem neces- 

November/December l l )K2 



sary in a program in which one subroutine 
in the program (block E) is used to rewrite 
other subroutines within the program 
(blocks F and G). Let's see how the 
Variables Transfer routine can modify 
itself so that it can be used at any location 
in memory. 

First, look at the first instruction in 
block F, LD BC, #bytes. While claiming 
to load BC with the number of bytes in 
the variables space of a Basic program, 
the four zeros in column 4 show that in 
actuality BC is only loaded with zero, 
that is, if block E, i.e., USR P, is not 
called prior to calling block F, i.e., USR 
(P+54). How does block E change those 
four zeros to the number of bytes to be 
transferred? 

The four zeros make up the two bytes 
at RAMTOP -t- 37h and RAMTOP + 38. 
Confirm this with column 3 (37h = 55d 



and 38h = 56d). Now look at block I. 
Block I subtracts VARS from E LINE 
then decrements the result to obtain the 
amount of variable space that you want 
to transfer when you call block E (i.e., 
USR P) (see the chapter on system vari- 
ables in your manual). The amount of 
variable space is now sitting in the HL 
register pair. Because the IX register was 
loaded earlier with RAMTOP, the next 
two instructions, LD (IX+37),L and LD 
(IX+38),H rewrite the two bytes that we 
just discussed in block F. Now block F 
truly contains the number of bytes to be 
transferred. Four instructions in blocks F 
and G appear to load a register pair with 
zero. Actually, block H writes the desti- 
nation into block F and the source into 
block G, then block I writes the number 
of bytes into blocks F and G. Block J puts 
the last address in block Z into the BC 




SEA WAR 
FORZX81 

This game is designed for one or two players Each player has three submarines As a certain 
number of points are reached, bonus submarines will be given When the game is going on, the 
higher the score you get, the more that hostile features will appear on the screen 
The features which appear on the screen are as follows: 
Submarine. Warship, U-boat and Helicopter 

Submarine 

This feature is under your own control and is loaded at the left hand side of the screen The keys 
9 and are the firing buttons for the upward missiles and forward missiles respectively 
The submarine can be moved in four directions; it can move upwards and downwards by 
pressing keys 7 and 6 respectively In order to move forward, you press key 8 and it will draw 
back to its previous position when you release the button Also, the submarine can be moved 
diagonally upwards or downwards by pressing both keys 8 and 7 or keys 8 and 6 respective- 
ly at the same time 

U-boat 

This is the hostile submarine It drifts under the sea level randomly, from right to left Missiles are 
fired as it approaches your submarine Destroying a U-boat scores 20 points 

Warship 

This is the enemy destroyer which will release bombs diagonally as it drifts on the sea surface 
from right to left 

The destruction of a warship is done by either firing a vertical missile or. when the submarine is 
lust under sea level, by pressing keys '7 and 0' which release a horizontal missile Otherwise the 
missiles will just pass under the ship bottom Each destruction of this feature scores 50 points 

Helicopter 

As you reach a certain score, helicopters appear on the left hand corner of the screen; they drop 

vertical bombs as they hover above the submarine To destroy the helicopters, vertical missiles 

can be fired by pressing key 9 Each helicopter destroyed scores 100 points 

"New Game — ADDER— Arcade-type game 

Shoot the numbers as they pass across the screen, but watch your total 

Each game $9 95 plus $2 00 postage/handling 
Distributor Inquiries Welcome 



Amda 



k 



Software. 



51 Elgin Street, Shelton 
Stoke-on-Trent ST4 2RD, England 



register pair so that this information is 
returned to you when you PRINT USR P. 
Although I said that the Variables 
Transfer routine can be used at any start- 
ing address, the use of the IX register just 
described above forces one qualification 
on that statement. The Variables Transfer 
routine can be used at any starting address 
provided that its starting address is 
RAMTOP. Rather than loading 
RAMTOP into the IX register, we could 
have the program discover its own starting 
address by reading the program counter, 
and then load that address into the IX 
register. This would free us from the 
above qualification. I will leave the 
method by which one transfers the con- 
tents of the program counter to the IX 
register as a puzzle for those of you who 
write machine language. (The answer will 
appear at the end of this article.) 

Suggestions to Machine Code 
Programmers 

The Sinclair and Timex/Sinclair com- 
puters are serious computers, and their 
usefulness will be limited only by the 
quality of the software available for them. 
Therefore, I suggest that those of you 
who write machine language routines 



write them so that they can be used at 
any location in memory. 

To return now to practical matters, 
Sinclair cautions us that a USR routine 
should not disturb the IX register if com- 
pute and display is operating. In spite of 
this caution, I have failed to crash my 
system yet. Conservative advice would 

Figure 6. 



Add these lines 
1 REM MC ARRAYS 

100 DIM Z(m) 

110 LET P=PEEK 16388+256*PEEK 1 
6389 

120 PRINT "AT LEAST#":USR P-Pj" 
# BYTES ABOVE RAMTOP?" 

130 STOP 

285 RAND USR (P+5^)- 

Change line 280 to, 

280 POKE PEEK l6^00+256*PEEK 16 
4ul+6+V,l6*C0DE (H$)+C0DE (H$(2) 



be to run the machine in the FAST mode 
when you are dealing with a questionable 
situation like this one. 

A Mystery Application 

The Variables Transfer routine can be 
used to compile machine language rou- 



SOUND EFFECTS 

MUSIC GENERATION 

TWO 8 BIT I/O PORTS - 
DUAL ATARI JOYSTICK CONTROL 

The ARCADE MASTER WJKfoS 

KIT $54.95 • A&T $64.95 • PC Board $24.95 

Now you can create complex arcade quality sound effects, 
write melodies in 3 part harmony, and control the action 
with one or two Atari Joysticks (not included) 




•3 tone generators - 8 octive range 

• 3 channel mixer, amplitude controller, 
and envelope generator 

•Noise generator 

ALL INDEPENDENTLY PROGRAMMABLE! 
•Internal speaker, volume control, and 

audio output jack 
•Requires no additional power supply 

• Complete instruction manual & examples 



SPS-2A/ 

•Can be used with printer, 16K rampak, 

and most other modules 
• Memory mapped so it can easily be 

programmed in basic using peek & poke 
•User selectable to the start of any 4K 

memory location 
•2 Independent, TTL compatible I/O 

ports can be used as general purpose 

input/output, or with joysticks 



2 AMP 
POWER SUPPLY 

ZX80/81 • TIMEX1000 • MICROACE 

As you expand your system, you'll need 

more power to run it. 

This supply has itl 

SPS-2A -- Power Supply -- $19.95 



MULTIPLE OUTLET STRIP 

with built in 

TRANSIENT ABSORBER 

PROTECTS YOUR COMPUTER SYSTEM 

FROM DANGEROUS VOLTAGE SPIKES 

Absorbs transients and surges such as 

those produced by lightning, switching 

surges and noise spikes. 3 protected A.C. 

outlets, 15 A. fuse, power switch & pilot 

light. 6 ft. cord 
TA3 -- TRANSIENT ABSORBER -- $26.95 



Send check or money order to: 

HURRICANE ELECTRONICS • P.O. Box 87 • Dolton, IL 60419 

Include $2.50 shipping/handling per order — III. residents add 6% tax 




tines for use in a single Basic program. 
All you need is a loading program that 
places your machine language in an array. 
This is easily obtained by adding and 
substituting a few lines in Figure 1 . 

Make the changes in Figure 1 that are 
shown in Figure 6. The number, m, should 
be large enough that 5 * m is greater than 
or equal to the number of bytes in your 
routine. If Z(m) is the first array held in 
block Z, then the starting address of your 
machine language routine is RAMTOP 
+ 85 in block Z and 

PEEK 16400+ 256*PEEK 16401+6 
in the variables area of your Basic pro- 
gram. PEEKing the contents of the 
machine language that you enter will be 
easier from its block Z addresses because 
the variables space below RAMTOP 
moves around quite a bit. 

When modifying Figure 1, set m in line 
100 equal to 4. This provides you with 4 * 
5 = 20 bytes of space. RUN the modified 
program, then type CONTinue. Figure 7 
contains a routine which returns the num- 
ber of unused bytes below RAMTOP. 
(This was written by Dr. Ian Logan and is 
reprinted here with the kind permission 
of SYNTAX ZX80, RD2 Box 457, 
Harvard, MA 01451.) Enter the bytes in 
Figure 7 (i.e., 2A and ENTER, 1C and 
ENTER, and so on). Then type END and 
ENTER. To find out how much unused 
memory you still have below RAMTOP, 
type PRINT USR (P+85) and ENTER. 
The number 204 should appear at the top 
of your screen if you are working with a 
IK machine. As you can see, there is not 
much space left. On the other hand,, you 
do not need much memory to have fun 
with machine language! 

Figure 7. 



Dr. Logan's Bytes Remaining 
Sequence 
2A,1C,40,CD,CB,0E,E5,C1,21,1'+, 
00,00,ED,'f2 p E5,Cl,C9 



Congratulations if you have made it 
through this article. If you have a useful 
program or two, and in addition, a few 
points to puzzle over, then we have both 
succeeded. 

The Answer to the Puzzle 

When you CALL a subroutine from 
within a machine language routine, the 
program counter is pushed onto the stack. 
The first instructions in the subroutine 
should then be POP IX, PUSH IX . . . etc. 
RET. When the main program is returned 
to, the IX register will contain the address 
of the instruction following the CALL 
instruction in the main routine. For the 
sake of simplicity, we can have the sub- 
routine decrement the IX register so that 
it contains the starting address of the main 



106 



SYNC Magazine 



routine upon return to the main routine. 
To preserve the contents of the IX reg- 
ister through all of this, the first instruc- 
tion in the main routine should be PUSH 
IX. Then, CALL the routine immediately. 
At the end of your main routine, do not 
forget to POP IX. 

Figure 8 shows a subroutine that will 
put the starting address of a main routine 
from which it is called into the IX register 
on return. The main routine must begin 
with PUSH IX, CALL 16514, as above. 

Figure 8. 



Address 


Hex 


Decimal 




In REM 


object 


object 




statement 


code 


code 


Instruction 


16514 


DD.E1 


221,225 


POP IX 


16516 


DD.E5 


221,229 


PUSH IX 


16518 


06,05 


006,005 


LD B,5 


16520 


DD.2B 


221 ,043 


DEC IX 


16522 


10, FC 


016,252 


DJNZ e 


16524 


C9 


201 


RET 



To implement this routine with a version 
of the Variables Transfer routine, VAR 
PLUS, load the bytes in Figure 8 into the 
test program in Figure 9 and SAVE the 
result. 

Now LOAD the Variables Transfer rou- 
tine, but do not type RAND USR 16514. 
Just leave it in the REM statement. POKE 
in the changes that are shown in Figure 
10, (i.e., POKE 16520,0 and ENTER, 
POKE 16521,17 and ENTER, and so on). 
Add the lines in Figure 11, and you have 

Figure 9. 



1 REM XXXXXXXXXXX 
10 LET P=l?252 
20 LET A=10 
30 PRINT "INITIAL A=" 
40 RAND USR P 
50 RAND USR (P+54) 
60 LET A=l 

70 PRINT "ALTERED A=" 
80 RAND USR (P+66) 
90 PRINT "RESTORED A= 



I A 



a program that prompts you for a starting 
address, and then locates itself there. Be 
sure that you have plenty of space above 
RAMTOP, then RUN the program. For 
the test program in Figure 9, you should 
enter 17252 when the screen prompts you. 
RAMTOP must be smaller than this. 

LOAD the test program and RUN it. 
The screen should show the following: 

INITIAL A10 

ALTERED Al 

RESTORED A 10 
Note that any program that uses the IX 
register in the manner that the modified 
Variables TRansfer routine (VAR PLUS) 
does, can use the Figure 8 routine to 
locate itself. Thus one routine must 
remain tied to an address while the others 
go free. \ 



Figure 



Figure 10. 



M Statement 




Decimal 




addresses 


Hex changes 


changes 


Instruction 


16520 
16529 
16532 
1653^ 


00,11 ,00,00 
CD, 82, 40 
DD.E5 

El 


0,17,0,0 
205,130,64 

221 ,229 
225 


LD DE , nn 
CALL 16514 
PUSH IX 
POP HL 



practical 
software 

FOR THE SINCLAIR ZX80/81 (8K/16K) 

WALL STREET TRIPLE JOTSEE 

• Strategy game for 1 -3 players • Game of luck and strategy for 

based on the ups and downs 1 -6 players with all the excitement 

of the Stock Market of dice rolls 

SPECIAL INTRODUCTORY PRICE $9.95 EA. 

Regular price $14.95 ea. 

ZX INVENTORY ZX DIRECTORY 

• STORAGE OF 200 ITEMS ANO PRICES* SORTS FILES ALPHABETICALLY 

• PRINTING CAPABILITY (ZX81 1 • STORAGE OF 60 FILES I I6K) 

• COMPREHENSIVE SEARCH . PRINTING CAPABILITY (ZX8I I 
ROUTINES • COMPREHENSIVE SEARCH 

ROUTINES 

BOTH PROGRAMS EASILY MODIFIED TO 
STORE MORE FILES WITH LARGER RAM PACK. 

ONLY 19.95 EA. 
BOTH PROGRAMS FOR 34.95 

SEND CHECK OR MONEY ORDER TO 

SERVITRONICS 

P.O. BOX 2024, HARTFORD, CONN. 06145 

FOR INFORMATION OR VISA OR MASTERCARD ORDERS 
CALL (203) 643-7900 SHIPPING US $1 50 OUTSIDE US S3 00 
dealer enquiries welcome 



2 REM VAR PLUS 

10 PRINT "ENTER THE ADDRESS TH 
AT YOU WANT VAR PLUS TO BEGIN AT 

20 INPUT P 

30 POKE 16522, 256*(P/256-INT ( 
P/256) ) 

40 POKE 16523, INT (P/256) 

50 RAND USR 16514 

60 PRINT "P IN YOUR APPLICATI0 
NS MUST NOW =#";P 



COSMONICS 

FOR THE ZX81 AND TS1000 COMPUTERS 

TIRED OF SAVING 16K 
OF PROGRAM JUST TO SAVE 



2K OF DATA? 



2 2-2-2 




The COSMONICS READ/WRITE UTILITY will allow you to save 

ONLY what you want to save from strings, arrays, or a 

location in memory onto a cassette. You can read it 

back when you want to use it. This data can be used by 
the same program or by different programs. 

The COSMONICS READ/WRITE UTILITY can also make it easi- 
er for you to translate programs which are written for 
other computers in BASIC, and which have "WRITE to cas- 
sette" and "READ to cassette" statements. This use of 
the utility can greatly Increase the amount of software 
available to you. 

The COSMONICS READ/WRITE UTILITY is easy to use, and it 
loads easily. The instruction'; nre clearly written, and 
a short sample program which demonstrates it's use is 
is included. The routine occupies approximately 500 
bytes, and requires a minimum of 2K RAM. 

The COSMONICS READ/WRITE UTILITY is now available for 
$17.00 + $1.50 postage and handling. Calif, residents, 
please add bX or 6.5% sales TAX. 

Send self-addressed, stamped envelope for FREE catalog. 

COSMONICS 

P.O. Box 10358, San Jose, CA. 95157 



November/December 1982 



107 



»■ »i »» n I L" «« 

VOTEM 




$39.95 (KIT) 

J59.95 ( A4T) 

ANALOG INTERFACE FOR THE ZX81 

Walcom* your computer la ffi* 'mat warU~ o< wislaa 
tignai orocoMlng VOTEM It a c offlnt t t 

aiding ol tha xkmm^ nantwara and soft 



»ignal tci <JapendaW« LOAD* 

(a campalrtjla with ' 

m 

■ Require* atisolulaly no modillcaliona lo oompular 

• Ma i urpa vDitaQM and t«n>p»r*iur** 

• Proba provtdad lor air and liquid lampataiuia 
maaautamanta 

• Resolution .a batiar than 14 Hta (000005V or 0.04 
tfagreeaQ 

• Voitaga rang* ol 



• Low powar, raqulraa was than 20mA ai * 11V 
untegulaled 

• Can 0* powanM from compular'i aupply {catMa Includatf) 

• Tapa algnaJ conditioning circuitry 

• Tapa signal monitoring caoatrtlitv (audio and waual) 

• Manual Include* dalaitad Kit aatambly and cailOr»tton 

• Software tor calibration and appllcallona fit* In 1K RAM 

• Instruction* tor adapting to other ZOO computar ayaiama 

• Compact. 1" by 4" by 3" 



Alio, italic RAM chip* 6110P 3 (7K by 8)wltri Inali 

ten upgrading Sir ' ' 

Baachband cnechot mooa> ordar 



traction* 

Sinclair /XBt computar from IK lo IK Only 
*nd chat* or monay onjar. Includa S3 afiipp- 
ng and handling 




Down E«sl Computers 

P.O. Box 3096 
GrMmrtlla. NC Z7S34 



WANTED: 

Creative/innovative ZX81/ 
TS1000 "Pros" to indepen- 
dently develop software for 
national retail distributor. 
Z-80 machine language 
capabilities a plus. Generous 
royalties. 

Send name, phone number, 

and qualifications to: 
TIME WORKS INC. 
P.O. Box 321 
Deerfield, IL60015 

All qualified respondents will 
be contacted. 



FLORIDA CREATIONS PRESENTS: 

SINCLAIR 

SOFTWARE 
^f CHEAP ^ 

» GAMES 

»HOME 

» BUSINESS 

» TECHNICAL ARTICLES 

ZX-81 and TS 1000 
Ik through 16k memory 
MOST PROGRAMS SO 0EKTS EACH OR LESS 

Catalog & two sample 
programs for $1 and SASE 

FLORIDA CREATI0K3, DEPT. 3CS , P.O. 
BOX 16422, JACKSONVILLE, PL, 32245 

"•SATISFACTION GUARANTEED**".** 
(Not a part of Sinclair Reaear 

iriipjlliilipjuglil""' 




Game Review 



Mazogs 

David Grosjean 



Jim Beloff reports in "The Zedex 
Microfair" on the enthusiasm of the fair 
goers for the adventure game Mazogs. 
We share that enthusiasm. 

In Mazogs you are an adventurer 
searching for a treasure in a HUGE maze. 
You must find the treasure and return to 
the entrance of the maze within a certain 
number of moves. Scattered throughout 
the maze are creatures called Mazogs 
whose job is to stop and kill you. You can 
kill them if you find one of the swords 
lying around the maze. Otherwise, you 
have a 50/50 chance of surviving if you 
get into a fight with one. By killing a 
Mazog you increase the number of moves 
you have. Also scattered throughout the 
maze are prisoners (trapped in the walls) 
who tell you which way to go,«but their 
directions will take you only a short 
distance. 





Certain commands help you in the 
search, but each one costs you moves. 
E.g., a "view" shows a larger view of the 
maze than the 20 spaces normally shown; 
a "status report" tells how many moves 
are left, how many moves to the treasure, 
and how many moves the various com- 
mands cost. A sword can be bought, but 
at a very high price— half of your moves. 
You can quit the game, and the computer 
will tell you how far you got. 

After starving to death (running out of 
moves) or successfully returning to the 
entrance with the treasure, you can look 
at the maze which is four screens large. 
At this point the computer will print the 
solution. With three levels, it can keep 
you interested for hours on end. 

This game is outstanding because of its 
mixture of complexity and simplicity, its 



speed, and its ability to gradually lead the 
player up to a difficult game. It is a 
program written mostly in machine code 
but there is quite a bit of Basic, too. The 
game is rather long and takes about five 
minutes to load. We had no difficulty in 
loading it. The documentation is good, 
and the use of graphics is especially im- 
pressive (see sample run). The treasure 
seeker and the Mazogs are not tokens 
moving in the maze, but full fledged fig- 
ures with limbs that actually move. The 
size of the pixels on the Timex/Sinclair 
computers gives rather large figures, but 
they do move as the game is played. Just 
watching the graphics is fascinating. 

In short, Mazogs is an excellent graph- 
ics adventure program, and lives up to 
the publisher's promise of being a game 
"unlike any other game you've seen on 
the ZX81." H 



David Grosjean, 50 Kings Rd., 
07928. 



Chatham, NJ 



Mm 



SOFTWARE PROFILE 

Name: Mazogs 

Type: Fantasy Game 

System: 8K ROM; 16K RAM 

Format: Cassette 

Summary: Outstanding because of its 
mixture of complexity and 
simplicity, its speed, and 
its ability to lead the 
player. 

Price: £10 

Manufacturer: 

Bug-Byte 
Freepost 

Liverpool L3 3AB 
United Kingdom 



108 



SYNC Magazine 



Game Review 




Sea War 

David Grosjean 

Sea War is another excellent fast action 
graphics game that was a hit at the 
Microfair. 

The game starts by scrolling from right 
to left a very impressive "title page" asking 
for the number of players (the limit is 2). 
A rather large ship then travels across the 
surface of the water and drops your sub- 
marine into the water; then the action 
starts. You are now in a submarine just 
below the surface of the water, and you 
have to destroy U-boats, warships, and 
helicopters, all of which are capable of 
destroying you. The water surface is con- 
stantly moving, and, of course, enemy 
shots are constantly assailing you. 

Five keys provide the controls— up, 
down, forward (you drift back if your 
finger is off the key), fire up, and fire 
across. You must destroy the helicopters 
by firing up, the warships by either firing 
across or up, and the U-boats across. 
Helicopters count 100 points, warships 50 
points, and U-boats 20 points. You begin 
the game with three subs, and you can 
get additional subs when your score 
reaches 1000, 4500, and various scores on 
up. 

The use of graphics in this game is 
astounding. The action is quite fast (it is 
all machine code) and a little difficult to 
get used to. This is a sign of a good 
game— you cannot get bored easily unless 
you are also easily frustrated. Later in the 
game the attackers, mainly the subs, prac- 



David Grosjean. 50 Kinns Rd.. Chalham. NJ 
07928. 



ii_|m 



SOFTWARE PROFILE 

Name: Sea War 

Type: War game 

System: 8K ROM; 16K RAM 

Format: Cassette 

Summary: Fast-paced, astounding 
graphics; the best shoot 
'em game I've seen for the 
ZX81 

Price: $9.95 plus $2 s&h 

Manufacturer: 

Panda Software 
51 Elgin St. Shelton 
Stoke-on-Trent ST4 2RD 
United Kingdom 



tically cover the screen with shots, and 
this is when the game gets very hectic. 

This game is best played with a full 
keyboard, but the Sinclair keyboard is 
adequate. The only major problem with 
this program is that every now and then 
the program crashes (and it seems that 
this is always during the best game! i. 

In conclusion, this is the best "shoot 
"em" game that I have seen for the ZX81. 
It is a fast-paced game which keeps the 
player's interest. The graphics are, as I 
have said, astounding. The most notable 
features are the helicopters and the 
player's death scene. I strongly recom- 
mend this game to any arcade game fan 
who likes a challenge, and the price is 
nice at $10. SJ 



PUT YOUR TIMEX/SINCLAIR 
COMPUTER TO WORK! 

TIMEX/SINCLAIR SOURCEBOOK™ 

• SOFTWARE 

• HARDWARE ADD-ONS 

• BOOKS/CATALOGS 

Maximize your ZX80. ZX81 or TS1000 
computer investment with the TiMEX/SIN- 
CLAIR SOURCEBOOK which lists programs, 
hardware accessories and reference books. 

The SOURCEBOOK allows you to quickly 
identify the ZX computer products you need 
from a wide variety of sources to put your com- 
puter to work. Order your copy today — 
only $6.95 



TIMEX/SINCLAIR SOURCEBOOK™ 

Micro Design Concepts 

Dept. SC-5 

P.O. Box 280 

Car ronton. TX 75006 

Please send me the TIMEX/SINCLAIR 
SOURCEBOOK. I enclose $6.95 plus $1.25 
P&H ($2.50 outside the U.S.) Add sales tax 
in Texas. 

Name 

Address 

City 

Slate/Zip 

Have a product you would like listed 7 
U Check for an application for free listings. 




White T-shirts with red & 
black lettering. 

S-34-36. M-38-40, L-42-44 

s 7.50 PP d 

Tx. residents 

add 
5% sales tax 



Please give street address when order- 
ing. Make check or money order 
payable to: 



Pecos Star Co. 
Box 8348 
Denton, Tx. 76203 



November/December 1982 



109 



ATTO-SOFT 

PRESENTS 

ZX-MAN 



ZX-MAN. Turn your ZX8I or TIMEX 
SINCLAIR 1000 into an arcade type game 
computer with ZX-MAN. IOO°o machine 
code makes this fast acting program as 
much fun as being at the arcades. With the 
joystick option you can have the real feel 
of game playing never before available for 
your ZX8I or TIMEX SINCLAIR 1000. 
I6K required $14.95 

JOYSTICK. With ATTO-SOFT'i JOY- 
STICK your ZX8I or TIMEX 1000 can be 

turned into an arcade type computer allow- 
ing fast control over ZX-MAN and other 
type software. Requiring only six simple 
solder connections inside your computer. 
Also included is software to develop your 
own programs S 1 4.95 

(Please add 1 I 50 Postage and Handling COD s add S2 00 ) 

Send check or money order to 

ATTO-SOFT 

832 E. Third Street, 
Galesburg, Illinois 6 1 40 1 
(309)343-41 14 



ATTENTION 

SINCLAIR ZX81 

OWNERS!!! 

Here's an inexpensive little book 
(Programming With The ZX81 ) that 
tells you how to use the features of 
that ZX81 you recently bought. It 
shows you programs that fit into the 
1 K machine and are still fun to use. 
Learn how the random number 
generator works and use it to sim- 
ulate coin tossing and dice throwing. 
Look at the patterns the ZX81 
graphics can produce. Animated 
graphics are also covered and com- 
plete programs for games such as 
Lunar Lander and Cannon Ball are 
included. Seven information packed 
chapters in this quality book. Order 
your copy today. Price is $5.75 post- 
paid in the US. 

ELECTRONIC TECHNOLOGY TODAY INC. S-1 

P O Box 83. Massapequa Park, NY 1 1762 

3 Send me my copy Of Programming With The ZXfl! 

n Send me your complete catalog 

Pnce of Booh mckxlmg Postage *5 75 



NV Stale Residents include Sales Tax 
TOTAL ENCIOSEO 



Attention Readers: 
You Can Review Products 

for SYNC! 




David Ahl 

We are overwhelmed! New peripherals 
and software are coming out for the 
Timex/Sinclair computers at an astonish- 
ing rate. So fast, in fact, that our in-house 
reviewers can't keep up with it all. 

Hence, we would like to invite readers 
to write reviews for us. Some products we 
receive here and will forward to qualified 
reviewers. However, for most reviews, we 
must depend upon you to write a review 
of a product you have purchased. (This, 
incidentally, is how you become a "qual- 
ified reviewer" and get a product for- 
warded from us.) Of course, we pay for 
all reviews. 

A word about the review itself. It must 
be factual and objective. The biggest 
single group of people who read Ford ads 
are those people who have just bought a 
Ford. We all have a psychological need 
to justify a purchase. However, a product 
review is not an appropriate psychological 
outlet to justify a purchase. Nor is it the 
appropriate place to vent your passion 
against a manufacturer who has wronged 
you in some way. 

Reviews should start with a brief de- 
scription of the class of product (say 
modem or drill and practice software) 
including what it should do. Next should 
come a thorough description of the spe- 
cific product being reviewed (no opinions 
yet). Next should follow your experience 
with the product: putting it together, using 
it the first time, using it later, and the 
reaction of others to it. Note the problems 
you met and the benefits that you have 
received from using it. It goes without 
saying that the product should be used in 
the environment for which it was 
intended. 



110 



The appropriate length for a product 
review is from 500 to 1000 words. Longer 
reviews are probably going into too much 
detail. A review of a game should be from 
150 to 300 words long. 

All software reviews must contain the 
standard Creative Computing/SYNC 
"Software Profile" information. That in- 
cludes: name of. package, type, author, 
system and memory, format, a summary 
statement, price, and manufacturer's 
name and address. 

We favor comparative reviews of three 
or four similar items over single reviews, 
but both are acceptable. 

Pictures and illustrations are absolutely 
vital with a review or article. If we have 
to go to the manufacturer for a publicity 
shot or photograph the item here, it won't 
be nearly as effective as your photos. If 
you're not a photographer, find a friend 
with a 35mm SLR, load it up with TRI-X 
or Kodacolor 400 and shoot the item. 
Vary the angle and lighting. They won't 
all come out, but four or five usable shots 
out of 20 easily justifies the $7 or $8 for 
film and developing. We don't need 8 x 
10 or even 4x5 prints; standard Fotomat 
3 1/2 x 5 is fine. But they must be glossy 
finish; matte is not acceptable. The details 
important for your review should not be 
lost in the very light or very dark parts of 
your picture. 

Illustrations should be done in black 
on white paper. Use India ink or a Pilot 
Razor Point equivalent. We prefer to use 
your illustrations than redraw things 
here. 

Manuscripts must be typed double- 
spaced with generous margins. Other 
helpful suggestions for preparing your 
manuscript are contained in the article 
"Writing for SYNC." Send a self- 
addressed stamped envelope for a copy. 

Please send all submissions to Paul 
Grosjean, SYNC, 39 E. Hanover Ave., 
Morris Plains, NJ 07950, and mark your 
envelope "Review." S 

SYNC Magazine 



Software Review 



If you are looking for specialized soft- 
ware to help your endeavors into Z80 
machine language, HOT Z will be the 
tool for you. HOT Z, available from 
Sinware, can be used with the 16K, 32K 
or 64K ZX81 or TS1000. There are both 
low memory (16K) and high memory 
versions available (32K & 64K). 

HOT Z sets out to be your guide 
through the 32,768 memory locations in 
the expanded TS1000/ZX81, but it does 
more than that! HOT Z not only lets you 
enter maching language (ML) com- 
mands directly into RAM locations 
(much like entering Basic), but it also 
lets you test your ML routines one step 
at a time, while displaying register 
values. 



SOFTWARE PROFILE 

Name: Hot Z 

Type: Machine language assembler 

System: 8K ROM (4K ROM available); 
16K RAM; 32K RAM 

Format: Cassette and manual 

Summary: At any price, HOT Z 

would be a bargain, but at 
$20 it is truly affordable. A 
valuable tool for the 
machine language pro or 
novice. 

Price: $19.95 

Manufacturer: 

SINWARE 

Box 323 

Dixon, NM 87527 



Modifications can be entered easily by 
using a special edit mode. Provisions 
have been made to allow you to use 
floating points operations already pro- 
grammed into the RAM, and smooth 
fast 24 line displays are used at all times. 

HOT Z includes a user aids program 
and a concise, well-written manual. The 
user aids will acquaint you with the 
commands you can use and will label 
various ML routines. 

Other functions of the HOT Z soft- 
ware are: Selective SAVEing and 
LOADing of memory blocks, and block 
transfers of sections of ML. Inserting 
and deleting ML commands is easily ac- 
complished. Routines can be labeled and 
those labeled can be used as destinations 
for branching commands. You can also 
find a routine by using the search com- 
mand and entering the label name. HOT 
Z converts from infamous HEX to deci- 
mal and back at the push of a button. 
ML mnemonics used are displayed. You 
enter the decimal or HEX code for an 
ML command and the mnemonic is 



III 

n 




Victor Schiller 



automatically displayed in its own 
column. 

For the ML neophite, HOT Z will 
greatly simplify your adventures into 
machine language, although the second 
paragraph in the manual states: 

"A minimum requirement for running 
HOT Z is some knowledge of the hexa- 
decimal (or hex) number system, which 
uses the characters 0-9 and F-F as its 16 
digits. By and large, the assumption is 
made that you, the new HOT Z owner, 
know something about Z80 machine 
code. If you do not, there is one indis- 
pensable peripheral device you should 
acquire: it needs no extra power or ca- 
bles or connectors. It comes in several 
models and is commonly called a Z80 
programming book. The one by Zaks 
(from Sybex) is useful, but those written 
specifically for the ZX are generally 
more simple. If you are learning, then 



use HOT Z as a blackboard to work out 
the exercises." 

My suggestion is to purchase one of 
the good books on ML and read it over 
while awaiting delivery (2-3 weeks). By 
the time HOT Z arrives, you will be able 
to charge right in. 

The more experienced ML program- 
mer will find the use of HOT Z quite re- 
freshing. The usual hassles of code entry, 
editing, and debugging are virtually 
eliminated. You will be free to concen- 
trate more fully on code formulation. 
The "one step" feature will allow you to 
easily follow the detail of your program 
without risking a "crash." Much time 
will be saved by using HOT Z. 

At any price, HOT Z would be a bar- 
gain, but at $20.00, HOT Z is a truly af- 
fordable software value. This package is 
a valuable tool for the machine language 
pro or novice. 5J 



or TIMEX 
1000 



Extend your ZX81 System: 
Add Memory that won't Forget! 



^ ADD YOUR OWN SYSTEM UTILITIES 

^ BUILD UP A LIBRARY OF MACHINE 
LANGUAGE SUBROUTINES 



UP TO 8K NONVOLATILE RAM 

USE HM6116P CMOS RAM *g> > 
OR 2716/2732 EPROM 



LOW POWER BACK-UP 



^ COMPATIBLE WITH 
16K RAM PACKS 



This memory board is designed to fill Ihe transparent 8K 
i memory (from S to 16K) in a ZX81-16K system 
The use ot HM6116P 2K CMOS RAM memory IC s with 
their own reserve power supply means that routines stored 
m the RAM are nonvolatile — the RAM retains its memory 
even when the ZX81 is switched off or reset Moreover, be- 
ing RAM. the routines you store in the memory are easily 
modified 

With this board it's no longer necessary to place your 
machine language routines in REM statements, in string 
variables, or beyond RAMTOP You can build up a resident 
library of machine utilities for use by your BASIC system 




ions " a M page manual 
make assembly of the board easy Construction takes be- 
tween one and two hours The kit (pictured above) is com- 
plete with a silkscreened solder-masked printed circuit 
board, ail capacitors, resistors, transistors, sockets, con- 
nectors, integrated circuits, and the lithium cell The board 
is supplied with one 2K CMOS 61 1 6P- 3 RAM — n will ac- 
comodate three more for a total of 8K 

Send check or money order for $29.95 plus $1 95 shipping 
and handling to the address below The printed circuit 
board with the instruction manual is available separately 
for $15 00 post paid 



HUNTER. 1630 FOREST HILLS DRIVE, OKEMOS, MICHIGAN 48864 



H 



November/December 1982 



111 



Hardware Review 



The Quicksilva Programmable 
Character Generator 



Martin Wren-Hilton 



The Quicksilva Programmable Character 
Generator: £26; Motherboard: £12; Edge 
Connector: £4. Quicksilva, 95 Upper 
Brownhill Rd., Maybush, Southhampton, 
Hants, U.K. 

The Quicksilva Programmable Char- 
acter Generator is a single circuit board 
which plugs into the QS Motherboard or 
the QS Edge Connector which plugs into 
the back of the ZX81. For the ZX80, a 
few small modifications are needed to 
connect it to the PCB. 

Once installed, it lets the user program 
128 different characters rather than the 
previous 64 and their inverses. After the 
board has been programmed, it can be 
LOADed with other programs which use 
the new character set. 

The QS Character Board is operated 
by a small switch mounted on the side to 
show the normal characters or the pro- 
grammed set. The board comes with 
comprehensive and easy-to-follow 
instructions as well as a demonstration 
cassette with two programs: CHR$ and L- 
CASE. CHR$ (IK) provides a series of 
machine code routines which make pro- 
gramming the board quite simple. L- 
CASE (3K) contains all the data for a 
complete lower case alphabet set. 

At the moment, the ZX81 gets the 
information for displaying the characters 
from the top 512 bytes of the ROM, from 
addresses 7680 to 8191. Each character 
takes up 8 bytes of data. For example, the 
letter R is made up as follows: 

Contents 
Location in Binary Total Hex 



8120 


00000000 





00 


8121 


01111100 


124 


7C 


8122 


01000010 


66 


42 


8123 


01000010 


66 


42 


8124 


01111100 


124 


7C 


8125 


01000100 


68 


44 


8126 


01000010 


66 


42 


8127 


00000000 





00 



100LETL=USRSINC 
110LETL=USRQLOAD 
120 REM E007C42427C444200 

130 REM STOP 



Figure 1. 



-.Loads the normal character 
;set into the character RAM. 
;Loads the following characters 
;into character RAM. 
;The first letter is the one 
;that you want to change and 
-.the rest is Hex data for 
;the shape of the new 
character. 

;Tells the computer that you 
;have finished LOADing new 
xharacters. 



Martin Wren-Hilton. 4 Little Poulton Lane. 
Poulton-Fylde. Blackpool FY6 7ET. U.K. 

112 



The QS Character board represents 
each character in exactly the same way. 
Thus for example, if for some obscure 
reason you wished that the letter E looked 
like R, you would load the CHR$ program 
and enter the lines in Figure 1 . 

Once programmed, the characters 
remain until they are changed or the 
power is removed. However, when the 
LPRINT and COPY commands are used, 
the normal Sinclair characters are sent to 
the printer. To circumvent this problem. 
CHR$ has the routines QCOPY and 
QPRNT. 

The uses of the character board are 
virtually limitless. Apart from the use of 
lower case to enhance programs, real 
"space invaders" can be easily created as 
well as more serious applications like 
circuit symbols and fine line drawings. 

By combining a number of characters 



together in one block, the user can pro- 
duce high resolution drawings. Figure 2 
shows a couple of curves produced on 
the board. Figure 3 shows how to plot 
high resolution graphs on a 256 x 176 grid 
such as seen in Figure 2. To change the 
curves, simply change the equations in 
lines 120 and 140. Due to the nature of 
the character board, you cannot plot very 
complicated functions because they 
would take up more than 128 of the 704 
blocks on the screen. The program needs 
more than IK, and, if entered after the 
CHRS program has been loaded, you can 
COPY the graph onto the printer. 

The QS Character Board has IK of 
static RAM on line which can be used for 
storing data and some machine code 
programs. The RAM lies between 33792 
and 34815. This means that only "relative 
jumps" can be used in any machine code 

SYNC Magazine 



that is stored there. There is a 4-way 
D.I.L. switch on the board which should 
be off when the ZX81 is in SLOW mode. 
When the board is being used in FAST 
mode, or on the ZX80 switches 3 and 4 
should be on. All the logic chips and the 
two 2114s are soldered directly to the 
PCB which is double-sided. 

The board is clearly highly recom- 
mended and one of the most useful I have 
come across. 'u 



Figure 2. Hl-Res SIN and COS Graphs Using 
the OS CHRS Board 



<I-RES SIN HMD COS CRflpH S., USIN 
THE OS CHPS EQBRP. 





Figure 3. Listing to Generate the Graphs 
in Figure 2. 



2B»REM 

81 POKE 32SlS.5e 

22 POKE 32513,12 

23 POKE 32S14..127 
24. POKE 32515,95 

25 POKE -32516. SB 

26 POKE 32517.13 

27 POKE 32518,127 
26 POKE 32519,179 
29 POKE 32528,6 
38 POKE 32521,0 

31 POKE 32522,79 

32 POKE 32523,201 
«0 REM 
SB REM 

60 LET L=USR CL.R 

70 FB5T 

60 DIM RJI32.17S) 

90 DIM E» (32,22) 

100 REM 

110 FOR X=0 TO 255 

120 LET Y=86+S6*SIN IX/128JPI) 

130 GOSU5 5000 

14.0 LET Y=88+B6*COS <XV128*PI) 

150 OOSUB 5O00 

160 NEXT X 

170 GOTO 5080 

5000 REM ■ |1 MM || l< ■ I ■ 

5010 IF X<0 OR X>255 OR Y<0 OR Y 

> 175 THEN RETURN 

5020 LET BcINT (X/8) +1 

5030 LET B=176-INT Y 

5040 POKE 32524., CODE n«lfl,B.I 

S0S0 POKE 32S25,2»* (6JB-INT X-l) 

5060 LET H»(B,B)=CHP» USR 32512 

5070 RET URN 

5080 REM 

5090 LET C=0 

S100 FOR R=l TO 32 

S110 FOR B=J TO -176 STEP 8 

5120 IF Bi(B,BJ < > " " OR BJ(«,B*1 

1<>" " OR R»(R,B*2J<>" " OR R«(R 
,B+3)<>" •■ OR fi» CR,B+*> < > " " OR 
fl»IB,B + 5) O" " OR B>(H.B*6) < > " " 

OR fi»[fi.e ( 7l <>" " THEN C-OSUB 51 
60 

5130 NEXT B 

5 140 NEXT R 

5 150 GOTO 5250 

5160 LET C=C+1 

S170 IF C>127 TMEN GOTO 5250 

5180 LET BSIR.l+INT (B/8) ) =CHR| 
(C+64* (C>63) ) 

5190 FOR D=0 TO 7 

5200 LET E=CODE R»(H,8+D) 

5210 IF C>63 TMEN LET E =255 -E 

5220 POKE 33792+C»8+D,E 

5230 NEXT D 

5240 RETURN 

5250 SLOU 

5260 FOR R=l TO 32 

5270 FOR B=l TO 22 

5280 PRINT RT B-l , R - 1; B* IB , B ) 

5290 NEXT B 

5300 NEXT R 

5310 IF INKEY»«"2" TMEN LET L =U5 
R OCOPY 

5320 IF INKEY» = "X" TMEN GOTO 534. 

e 

5330 GOTO 5310 

53*0 LET L=USR SINC 



new 



ANALOG 



TjtZit 2.5 JJS A/D CONVERSION TIKE. 8 BIT RESOLUTION. 



INTERFACE BOARD 

8channels AtoD + DtoA 



B CONTINUOUS ANALOG OUTPUTS 

. 56V (0-5V W/EXT. V cc ) . 
8 ANALOG INI' 
ADDRESS PICKS CHANNEL. 
DIP SWITCHES SELECT MEMORY OR 
I/O MAPPING AS WELL AS WHICH 
BLOCK OP ADDRESSES ARE USED. 
CAN USE ZX POWER SUPPLY. 
: DESIGN ALLOWS EASY 
:RFACING TO ANY ZRO CPU TYPE 
MICROCOMP' i HERS. 

MANY MOUNTING OPTIONS TO ZX 

.EST CHIPS. 
KIT S180. ASSEMBLED 4 TESTED S230 




BUFFERED BUS / DEVELOPMENT BOARD 
KIT $65. Bare Board $40 w/conhectop & manual. 



UHF Modulator 



■ 
PLACES VHF MODUUVl I 



$15 



CONNECTORS 



FOR 50 WIRE RIBBON. FEMALE TO ZX $7. 

MALE TO PERIPHERALS S7. GOLD PLATED. 
ELIMINATES VIBRATION PROBLEMS. 
USE BOTH CONNECTORS TO AVOID 
ROW INVERSION PROBLEMS. 



•$3 MINIMUM SHIPPING CHARGE. CAL RES ADD 6. 
* &SE SEND STAMP FOR MORE INFO. TO ORDEP 
CHECK 01 "ALL FOR COD. PRICES SUBJECT TO CHANGE. 



TERMS 




(jDmputer d 

301 16 th Ave <C 

San Francisco, CA 94118 (415) 752 6294 



ontinuum 



oocMiiaRs 



# 



BUT A COMPLEX SIMULATION OF FOUR MILITARY- INDUSTRIAL 
ECONOMIES LOCKED IN A DEADLY STRUGGLE FOR SURVIVAL 
ONE TO FOUB PLAYEBS COMPETE WITH EACH OTHER AND OR 
THE COMPUTER BALANCE OF POWER DEPENDS UPON 
SKILL IN DEVELOPING RESOURCES. USE OF ESPIONAGE. 
EXPLOITATION OF ALLIANCES. AND UTILIZATION OF MILITARY 
POTENTIAL REQUIRES ZXB1 WITH SK ROM AND 16K RAM 



ORDER FORM FOR OOOIYclRS] 

Send $14 (plus $1 for shipping) to: STRATAGEM CYBERNETICS, INC., 

286 Corbin Place, 2E, Brooklyn, New York 11235. 

NAME 

ADOHESS 

STATE 



mm' 





^^^ \>g\ 



November /December 1982 



113 



8KROM 
16K RAM 



A Keyboard Learning Game 



New users of the Timex/Sinclair com- 
puters sometimes spend a long time hunt- 
ing for a specific key. The keys that are 
not used frequently remain hard to find. 
Keygame is intended to help the user 
become familiar with the keyboard and 
to have some fun while learning. 

Keygame classifies users into five skill 
levels: 1) beginner, 2) trainee, 3) pro, 4) 
expert, or 5) master. The character set is 
subdivided into seven subsets. The begin- 
ner is asked to find only the simple keys, 
i.e., those in the L-cursor mode requiring 
no shifting. The trainee must cope with 
the shifted keys. The pro has to find the 
keyword keys such as PRINT, IF, and 
SAVE. The function and graphics keys 
are added for the expert and master, 
respectively. 

As the player's skill level increases, his 
handicap increases in steps of 10. The 
beginner has no handicap; a trainee has a 
10 point handicap, and so on for each 
skill level up to a 40 point handicap for 
the master. Furthermore, less time is 
allowed to find each key as the skill level 
increases. 

The immediate goal of the game is to 
score 150 points to win a promotion to 
the next highest level. The object of the 
game is to score 150 points at the masters 
level. Promotions occur automatically 
when a score of 150 points is attained; 
demotions occur if one's score falls below 
one. A player may start at any level de- 
sired because the promotion/demotion 
system is self-correcting. The points 
gained for each key equal the skill level 
associated with the key: 1 point for 
ordinary keys, up to 5 points for the 
graphics keys. The penalty for a missed 
key is double the point value of the key. 

In responding, it is necessary to press 
the shift key for those keys that normally 
require it, i.e., shifted keys and graphics 
keys. It is not necessary to press the 
shifted 9 first to enter a graphics key 
response or to press the shifted ENTER 
key to enter a function key response. The 
program takes care of that automatically. 

One's skill level will increase with play- 
ing. If desired, the response time limits 
can be shortened (or lengthened) by de- 
creasing (or increasing) the value of the 
first number in the parentheses in line 
520. 

We hope you enjoy playing Keygame, 
but, more important, we hope you will be 
able to master the keyboard in this rather 
painless way! gj 

Joseph J. Charles. 130 Sherwood Dr., Hilton, NY 
14468. 



Joseph J. Charles 



THBNK YOU FOR PLOYING ME . 

I UPS TIRED OP JUST BEING 
UOUND ON THAT CASSETTE. 

WHAT IS YOUR NAME-? 

SYNK, ARC YOU A..,. 

1 BEGINNER ( KEYS ) 

a TRRINEE <+SHIFT ) 

3 PRO (+KEYUORD3) 

* EXPERT (tfUNCTIONI 

5 HRSTER < (-GRAPHICS) 



OK, SYNK, YOU ARE PLOYING 

OS RIN) PRO . YOUR STORTING 

SCORE IS SB POINTS. 




KEY : PRUSE 
POINTS: 3 SCORE. S3 



10 REM KEYGAME 

20 REM WRITTEN BY JOSEPH J. CH 
RRLES 

38 REM 130 5MERUOOD DR. HILTON 
,NY 14466 17161392-S15S 

4.0 REM 11 45 PM 7/31/62 

50 DIM L*(5.B) 

60 DIM H*(5,9) 

70 SLOU 

30 LET Z«="CPPIJKOUEASDZXRHFGO 
LYUN" 

90 LET L*(l> = ' BEG INNER " 

100 LET L*<2) = "TRAINEE " 

110 LET L*(3)="PRO " 

120 LET L$<4> ="EXPERT " 

130 LET L«<S)="MRSTER " 

140 LET M§(1>=" KEYS" 

150 LET M»(2)"'tSHIFT" 

160 LET M« (3) ="+KEYUOROS" 

170 LET M« C4) .••♦FUNCTIONS" 

180 LET M*(S> ••♦GRRPHICS" 

190 LET U*= "1234567890123456789 
0" 

200 GGSUES 1830 

210 LET Y*="" 

220 PRINT "THANK YOU FOR PLRYIN 
G ME. " 

230 PRINT 

340 PRINT "I UOS TIRED OF JUST 
BEING" 

250 PRINT "UOUND ON THRT COSSET 
TE. " 

260 PRINT 

270 PRINT "UHRT IS YOUR NRME*? " 

280 INPUT N* 

290 PRINT 

300 PRINT N*.;", ORE YOU A..." 

310 PRINT 

320 FOR 1=1 TO 5 

330 PRINT TAB (5) .: I.; " ";L»(Ii.i 

340 PRINT TAB ( 16) ; " t " i M» 1 1) ; 1 

350 NEXT I 

360 PRINT 

370 INPUT L 

330 LET 5C = 100-10KL-1) 

390 RRND 

400 PRINT 

410 PRINT "OK.. ";N»;", YOU ORE 
PLAYING" 

420 PRINT "OS O(N) ";L»<L>;". Y 
OUR STORTING " 

430 PRINT "SCORE IS ",SC;" POIN 
TS. " 

440 PRUSE 300 

450 REM 

460 GOSUB 820 

470 CLS 

480 IF 5=3 OR S=6 TMEN LET L=-2 


490 IF S=5 OR 3=6 THEN PRINT OT 

1,9; "KEY: /";Y»; "/•" 

500 IF S<>5 AND S<>6 TMEN PRINT 

OT 1,9; "KEY: ", Y* 

510 LET X*="" 

520 FOR J=l TO (30-2*L> 

530 IF INKEY«<>"" THEN LET X»«I 
NKEY* 

540 IF X»<>"" THEN GOTO 5SC 

330 NEXT J 

360 REM 

570 IF 5=3 THEN LET Y*=CHA» ( 1C 
ODE Y«) -192) 

580 IF Y«>=CMR* 193 OND Y*<=CHR 
• 21B THEN LET Y«=Z» (CODE YS-L92 

590 IF 5=5 OR S-6 TMEN LET L=5 



Listing 1. Keyboard Learning Game. 



604» IF S=5 THEN IF X* < >U* (COOE 
Yf> THEN LET P=-2*P 

810 IF S=6 THEN IF X»(>U«(CODE 
Y»-118) THEN LET P=-2*P 

620 IF 5=5 OR S=6 THEN GOTO 640 

630 IF X«<>Y« THEN LET P=-2*P 

640 LET SC=SC«-P 

650 PRINT 

650 PRINT 

670 PRINT "POINTS: ",P;" SCOPE 

"; sc 

680 IF SCcl THEN LET L=L-1 

690 IF L=0 THEN LET L=l 

700 IF 5C>0 THEN GOTO 730 

710 PRINT N»; " YOU ORE NOU O (N> 

";L*(L> 

730 GOTO 790 

730 IF 3C<130 THEN GOTO 460 

740 IF L=5 THEN PRINT OT 10,0;" 

CONGRATULATIONS, ";N», ". YOU OR 

E THE GREATEST . " 
730 IF L=S THEN STOP 
760 LET L=L + 1 
770 PRINT "YOU ORE PROMOTED TO 

A<N> ";L» ID ; " . " 
780 PAUSE 150 
790 LET 5C=100-10» tL-1) 
800 GOTO 460 
810 STOP 

820 LET S-INT (LtANDtll 
830 REH SETS: 1:2 7:3:4:5 6: 
840 REH LEUELS : 1 : 2 : 3 : 4 : 5 : 
850 IF L.2 AND 5=2 THEN LET S=S 

♦5*INT t.S+RNO) 
860 IF L=5 RND 5=5 THEN LET S=S 

♦ INT t . St-RNO) 
370 IF 3=1 THEN LET Y*=CHR* INT 
127+37 *RND) 

880 IF CODE Y*=64 THEN GOTO 870 
890 IF S=2 THEN LET Y*=CHR« INT 
(11+16+RND) 

900 IF CODE Y*=12 THEN GOTO 
910 IF 5=7 THEN LET Y*=CHR» 

laismtBMD) 

920 IF 5=3 THEN LET Y*=CHR* INT 

t230+26*RNO> 
930 IF S=4 THEN LET Y»=CHR» INT 

(193+23 1RNDI 
940 IF CODE Y*«19S THEN GOTO 93 

950 IF 5=5 THEN LET Y«=CHR» INT 

(1+10+RND) 

960 IF 5=6 THEN LET Y*=CHR* INT 

C129+10*RND> 

970 LET P=S 

980 IF S=7 THEN LET P=2 

990 IF S-6 THEN LET P=S 
1000 RETURN 

1010 REH GROPHICS CODE CONUERSIO 
N 

1020 REH TYPE SHIFTED KEYUORDS A 
8 INDICATED BE LOU 
103a LET US(1)=CHR* 117 
1040 LET U$(2)=" RND " 
" U* (3) =CHR* 112 
ui(4) ." TO " 
u» (5) -CHR* 114 
Ui(6 TO 12)="<> STEP ST 
OP SLOU LPRINT "" OR " 
1090 LET U*(13)=CHR* 113 
1100 LET U«(14»="<=" 
1110 LET ui(13)=CHR« 115 
1120 LET U*(16)=">=" 
1130. LET U»(17 TO 20): 
LUST FAST " 
11*0 RETURN 
1150 REM SYNCSUM= 



390 
INT 



10BB LET 

1060 LET 

1O70 LET 

1080 LET 



THEN •• 



114 



SYNC Magazine 



resources 



The "Resources'* column lists new 
products for Sinclair users. Suppliers and 
users are invited to send brief product 
descriptions and details for ordering to: 
Resources, SYNC, 39 E. Hanover Ave.. 
Morris Plains. NJ 07950. 



User Groups 

Arizona 

• New Phoenix ZX80/81 Users Group. 
Contact: 

Randy Saxton 
4827 N. 63rd Dr. 
Phoenix, AZ 85033 
(602) 846-2882 

Connecticut 

• The New Haven Sinclair Study Group. 
Publishes a monthly newsletter for 
children. $6.00 payable to: 

Chris Baldwin 
Sinclair Study Group 
16 Lewis St. 
New Haven, CT 06513 

Illinois 

• Chicago/Des Plaines Area Sinclair 
Users Group (specializing in CIRCLE 
CHESS). Contact: 

A. F. Stanonis 

PO Box 63 

Des Plaines, IL 60017 

Indiana 

• Anderson, Indiana, area. Contact: 

Richard K. Berg 
915 Sunset Dr. 
Anderson, IN 46011 

n 17) 644-1873 (home) 
(317) 644-8861 (bus.) 

Maryland 

• Lanham Sinclair Users Group. Pub- 
lishes The Computerist, a newsletter at 
irregular intervals. Contact the editor: 

Cora C. Dickson 
9528 Elvis Ln. 
Lanham, MD 20706 
(301) 577-6645 



Missouri 

• Timex/Sinclair Users Group of Kan- 
sas City Contact: 

Peter B. Wolcott 
305 West 51st Terr. 
Kansas City, MO 64112 
(816) 753-8546 

New York 

• Mid-Hudson Users Group. Contact: 

Fr. Bruce O. Bowes 
Church of the Resurrection 
Hopewell Jet., NY 12533 
(914) 226-5727 

Pennsylvania 

• Central Pennsylvania ZX Users 
Group. 

Contact: 
Jim Whittaker 
Quarters G, Antrim Dr. 
Mechanicsburg, PA 17055 
(717) 766-8365 

• Turkey 

Club Mediterranean ZX8 1 
Mustaffa Sokullu 
Istasyon cad., 43/8 
Goztope, Istanbul 
Turkey 

Virginia 

• Franklin County area users. Contact: 

Gary Preston 
c/o C. Irvin 
Rte. 1, Box 21 
Glade Hill, VA 24092 

Washington, D.C. Area 

• Prince George's Sinclair Users Group 
(PG-ZUG). Contact: 

Jim Wallace 
5442 Tilden Rd. 
Bladensburg, MD 20710 
(301)699-8712 



User Group Forming 

• Sinclair users interested in using the 
ZX81 for stock market technical 
analysis. Contact: 

Daniel Swenson 
3439 Oakland Ave., S. 
Minneapolis, MN 55407 

• Educators and parents interested in 
applying the Timex/Sinclair to educa- 
tional settings. Contact: 

M. Mark Wasicsko 
School of Education 
Texas Wesleyan College 
Fort Worth, TX 76105 

• World Sinclair users invited to join our 
sophisticated multi-national club. Send 
SASE and short computer 
background. 

The Greater Metropolitan 

Club of USA 
ZX Users Group of New York 
Box 560 Wall Street 
New York, NY 10005 

Indiana/S Illinois/SW Ohio/NW 
Kentucky Area 

• Send long SASE to: 

The FUN-Z 
PO Box 914 
Jasper, IN 47546 

Louisiana 

• Greater New Orleans Area. Write to: 

E.V. Sandy Blaize 
417 Ridgcwood Dr. 
Metairie, LA 70001 

New Jersey 

• Morris County Area. A ZX80/81 
Spectrum Users Group. Contact: 

Larry Spencer 

6 Forest Ct. 

Morris Plains, NJ 07950 

(201)285-7819 (days) 267-5566 

(eves) 



November/December 1982 



lis 



RUNNERS! 

Road racing program cassettes for TIMEX 
SINCLAIR Computers (minimum 2K RAM) $5.95 
tor sample or send SASE tor catalog of programs. 

EVANSOFT - Dept. R 

1 246 Elmwood Avenue 

Evanston, IL 60202 



1or2K LISTINGSiBERZXORG} 
SLOTSiSCREEN STRL"AKS|3-D 
GrapheriEnqraver.ALL FOR 
S2.00I! Send a SASE & pay- 
ment tot m.K.Rosaa 
1923 i ithia Rd, 
VALRICO.FL 33594 



ZX TELEPHONE BOOK 

• Holds 720 names plus easy ADD/CHANGE' 
DELETE (unctions' 

• Extensive learner friendly documentation even 
snows you how to add multi-access capabilities! 

• Get this high performance 8K/16K listing at BIG 
SAVINGS 

• Only $4.95 from 

THOMAS B WOODS 

BOX 64 

JEFFERSON, N H 03583 



IMPROVED HEAT SINK for ZX8 1 & 
TS1000 eliminates system crashes 
caused by overheating. $7.95 
check/money order or SASE for 
complete details to: 
BASCO, 289 Baxter La, Milford 
CT 06460 



PORT - A - SINC 

Port-A-Sinc is a handsome attache style 

case which includes a spike protected, 8 

volt regulated power supply; and a 12 

volt, 2.6 AMP-HR, rechargable battery. 

Snap your Sinclair into port-a-sinc and 

leave it. You now have a completely 

portable computer as well as one which 

is protected against power outages and 

spikes. For complete details write: 

Anderson Engineering 

Rt #9, Box 19 

Tampa, Fla 33610 

Or enclose $140 check or money order 

for prompt shipment. 



IMPORTED GAME CASSETTES 

TIMEX + ZX81 t6K $14.95 EACH 

"10 GREAT GAMES NEW RELEASE! 

JUST IN TIME FOR CHRISTMAS KIDS 

■ TRADER JACK' FANTASTIC FUN GAME 

BUSINESS LOGIC-SOUTH PACIFIC LOCAL 

THIS ONE IS FOR DAD AND MOM! 

SAVAGE SOFTWARE, PO BOX 441 

TITUSVILLE, FL. 32780 



ZX81 16K Z80 DISASSEMBLER ON CAS- 
SETTE FOR $7.95. PROGRAM IS IN BASIC 
(5K) SO THAT YOU CAN EASILY MODIFY IT 
FOR USE WITH THE ZX PRINTER OR 
YOUR PARTICULAR NEEDS. 
ZX81 PROGRAMS 
106-B ANTOINETTE CT. 
CHARLOTTESVILLE, VA 22903 



Resources, continued 



New York 

• Southern Tier Area. Sign-up sheet and 
information newsletters at: 

Unicorn Electronics, Small Mall 
Harry L. Drive 
Johnson City, NY 13790 

Ohio 

• Cleveland area. Contact: 

R. F. Sieg 

19502 Thornridge Ave. 

Cleveland, OH 44135 

Canada 

• Vimont Laval area. Contact: 

Bill Walsh 

125 De Piemont 2 

Vimont Laval H7M 1B7 

Canada 



Graphics 

• Graphpak: Program using the Sinclair 
to present statistical information visu- 
ally and featuring bar graphs, line 
graphs, pie charts, and area graphs 
(rectangle divided to show percent- 
age). Program useful for enlivening 
term papers and proposals, plotting 
scientific data, assisting in business 
and family financial planning. 
Approximately 10K. Regularly $14.95 
but $11.95 if ordered before Jan. 31, 
1983; s&h included. SASE for details. 

Practical Computer Products 
21111 Strathmoor Ln. 
Huntington Beach, CA 92646 

• 4K Graphics ROM for the ZX81. Pro- 
vides 257 extra characters including 
lower case letters, graphics for various 
popular games, and inverses; board 
can be fitted with up to 4K extra ROM 
or RAM for machine code, U.D.G.s, 
etc.; board fits inside the ZX81 case 
under the keyboard; 3 solder connec- 
tions. $125. 

Ultimatum 

3470 McKinley Dr. 

Abbotsford, B.C. V2S 6B7 

Canada 

• Magic Graphics. Draws in 8 directions, 
lifts and moves the drawing point, re- 
draws the graphic, gives all co- 
ordinates of any graphic you create, 
moves your graphic to new position on 
the screen. 8K ROM; 16K RAM. 
$14.95. 

Orbyte Software 
PO Box 948, Dept. SR 
Waterbury, CT 06720 
(203) 753-8308 



Power Supplies 
and Switches 

• Power on/off switch for ZX81 or T/S 
1000. Greater convenience and elimi- 
nates wear and tear on plugs and jacks. 
iy 2 x iy 2 x 1 inches; plugs into the 
computer. $14.95. 

Robert F. Downs 
Lyon Ware 
1520 S. Lyon 
Santa Ana, CA 92705 
(714) 835-9512 

• Power supply to meet expansion needs 
of the T/S 1000, ZX80/81 Well-fil- 
tered, 2 amp supply powered by 3 
terminal grounded wall transformer; 
rectifying and filtering elements 
housed in small black enclosure. Plugs 
directly into input jack. $19.95 plus 
$2.50 s&h. 

Hurricane Electronics 
PO Box 87 
Dolton, IL 60419 

• ZX81 Power Supply. 2 well-filtered 
outputs Output 1: 5 volts at 1.5 amps: 
output 2: screwdriver adjustable from 
6.5 to 15 volts at 1.5 amps. Incor- 
porates push button to clear the com- 
puter, an LED power-on indicator, 
and connecting plug and cable; over- 
comes problem of heat in the original 
power pack; housed in 5 x 4 x 3 inch 
aluminum enclosure. $37.50 plus $3.50 
s&h. (California residents add 6'/ 2 
tax.) 

MacSwan-Packaging Co. 
PO Box 4697 
Downey, CA 90241 

Educational Programs 

• Educational Programs for the ZX81 
(16K). Ages in parentheses. French 
Revisions (14-17); Maths Revisions 
(14-17); Intermediate Maths 1 & 2 (8- 
13); Intermediate English 1 & 2 (8-13); 
Arithmetic for the under 8's; Educa- 
tional Quiz for all the family. Cas- 
settes, $10 each plus $4 per order 
shipping and packing. 

Rose Cassettes 

148 Widney Lane 

Solihull 

West Midlands B91 3LH 

U.K. 

• tVords. Exciting fun and education for 
all ages; six category spelling game; 
high motivation; positive reinforce- 
ment; one or many players. $14.95. 
The Quiz. Math game for grades 1-4; 
will improve skills at all ages; virtually 
unlimited problems of addition, 
subtraction, multiplication with 



116 



SYNC Magazine 



reinforcement graphics. $12.95. 
Orbyte Software 
PO Box 948, Dept. SR 
Waterbury, CT 06720 
(203) 753-8308 

• Lunar Cycle. Approximation for 
determining the lunar phase for any 
day this century; accuracy usually 
within 1 day; rarely over 3 days. 
Permutations and Combinations. Or- 
ders up to 33 items in one group. 
Arithmetic and Geometric Pro- 
gressions. Computes the value and 
sum of a specified number of terms 
with a common difference or ratio, 
starting with the first user-defined 
term. 8K ROM; 2K RAM. Listing 
and directions: $2 for each program. 

Stephen Zachev 
4859 Elmwood St. 
Muskegon, MI 49441 

Games 

• Lost in Space. Moving graphics; 
flicker-free. Steer ship past meteors 
and enemy ships; land on fuel ship for 
bonus; status monitor. 8K ROM; 16K 
RAM. Cassette and instructions: 
$11.95 plus $1.50 s&h (New Jersey 
residents add 5% tax). 

M. C. Hoffman Company 
POBox 117 
Oakland, NJ 07436 

• Acid Rain. Missile Alert. Superb graph- 
ics. Machine code. 8K ROM; 16K 
RAM. Both on one cassette: $14. 

Chris Taraba 
Box 394 

Goderich, Ontario 
Canada N7A 3Y5 

• Appolo. Red alert, defend your missile 
station. $14.95. Chopper. Manuever 
your helicopter through the treach- 
erous cavern, dodge the enemy fire. 
$19.95. Mission Escape. Simulates fight 
and flight in space; all graphic. $14.95. 
Froggy Hop. Help the frog cross the 
road to the lake. Tennis. Take on the 
computer. Gobbling Goblins, Horse 
Race, and High Rollers. 8K ROM; 
16K RAM. Each on cassette: $9.00 ex- 
cept as noted. 

Just Games 
172 Fifth St. 
Stamford, CT 06905. 

• Treasure Seeker. Graphics fantasy 
game; search for a treasure through 
multiroom dungeon while fighting dif- 
ferent types of monsters. Three other 
games included: Skiier, Mars Lander, 
Crumblin Caverns. 8K ROM; 16K 
RAM. Cassette: $7.95 plus $1 s&h. 

Spartan Software 
1403 Gloria Ln. 
Boulder City, NV 89005 



• Mars Lander. Position your cargo ship 
over your Mars base and land safely. 
8K ROM; 16K RAM. For details 
write: 

Mark E Rogers 
553 Melrose Dr. 
LaPlace, LA 70068 

• Space Adventure. Choose your speed 
and direction to navigate through the 
gravitational fields of four black holes 
to reach home safely; new configura- 
tion of black holes and home planet 
each run. Cassette and Basic listing: 
$10. 

Aries Associates 

5 1 1 Mary Ave. 

Huntingdon Valley, PA 19006. 

• Demon-Driver. Car chase with the user 
vs. the ZX81. Fully machine code. 
Send international ostal couoon for 
information sheet. Double-saved cas- 
sette, air mail to U.S.: $10; to U.K.: 5. 

Mrs. Dan Kurth 
Langgasse 51 
CH-3292 Busswil 
Switzerland 

Utility Programs 

• EX-HEX. Allows user to read, write, 
and test machine language programs 
in hexadecimal code; performs from 
menu: conversions (hex to decimal and 
decimal to hex), block moves, program 
insertions and deletions, RAMTOP 
setting, program saving (including pro- 
grams stored above RAMTOP). 8K 
ROM; 16K RAM. Cassette and 
instructions: $9.95 plus $1 s&h per 
order. 

RCO Technical 

PO Box 773 

St. Ann, MO 63074 

• The Display File Map. $1.00. (Free 
with order). Further information upon 
request. 

Harthun Engineering and Research 
PO Box 1 1 1 
Albany, KY 42602 
(606) 387-8391 

• "Teach Your ZX80/81 to Talk." De- 
tailed plans for hardware, parts 
sources, and software to make your 
computer produce natural speech; 
sounds human, not like science fiction 
robots. 8K ROM. $5.00 pp. 

Harthun Engineering and Research 
PO Box 1 1 1 
Albany, KY 42602 
(606) 387-8391 

• "Adventures in Artificial Intelli- 
gence." Life forms created range from 
simple "reflex" creatures to those ca- 
pable of "learning" and "killing"; en- 



Tape 
Load 
Anxiety? 




Don't spend a fortune on a disk 
drive until you try our: 

L&G Vu-Load Volume Monitor 

• insures program load every time 

• monitors tape output level 

• gives positive save indication 

• detects blank tape without 
disconnecting cassette wires 

• ready to use— no wiring 

Level-vu Prism 

Let's you see recessed tape counter 

without moving from seat 

• attaches easily to recorder body 
or lid 

• fits most recorders including 
Radio Shack, Vic-20, Atari 

• magnifies counter numerals 
Vu-Load Monitor $19.95 + 2.50 p & h 
Level-Vu Prism $3.95 + 1.00 p & h 

L&G Enterprises 

P.O. Box 6854 

Silver Spring, Md 20906 

(301) 774-0126 



ARTIFICIAL INTELLIGENCE 

FORTHEZX81? 

YES! 

SYNCZX is an artificial intelligence 
program with natural language capabili- 
ties for the ZX81 with 16K RAM, avail- 
able from Frog Software. 

SYNCZX will talk to you in ENGLISH/ 
NO MENUS. You can use SYNCZX to 
balance your checkbook or you can re- 
program SYNCZX to do anything you 
would like. However you do not need 
programming skills to use SYNCZX as 
is. Even a child can use SYNCZX be- 
cause it is easy to read and understand, 
talking to you in simple English. 
SYNCZX even remembers the people 
who use it! 16K cassette with manual 
only $6.95 plus $1.50 postage & han- 
dling. 

ALSO AVAILABLE 
PERSONAL COMPUTING PACKAGE 
7 programs. Graphs (1K), Appoint- 
ment book (16K), Checkbook (16K) and 
Three Games (1K), etc . . . All 7 for only 
$1 .95 plus 70c postage & handling. 
Send to: 

Frog Software 

Box 95 

Glenmont, New York 12077 

(518)465-6552 



November /December 1982 



117 



EDSON ELECTRONICS OFFERS 

Educational programs for grades 
1 -4 that reinforce what they learn in 
school. We also offer a digital dis- 
play load monitor for monitoring 
data from the cassette to the 
computer. 

Write to 

Edson Electronics 

P.O. Box 151211 

Tampa, Fl. 33684 

for free info. 



MARKETING SERVICES 

For those unfamiliar with techniques in mar- 
keting methodology 

Send us your original programs lor review 
Send S A S E tor full details, now 

Computer Software Marketing 

Box 48595 

Chicago. Illinois 60648-0595 



IS YOUR FAMILY TIRED 

OF PLAYING GAMES ON 

YOUR MICRO? 

ARE YOU LOOKING FOR WAYS 

OF CHALLENGING YOUR 

INTELLECT? 

INTELI-QUIZ IS THE SOLUTION! 

Through INTELI-QUIZ you can test 

your family's or your friends' knowledge 

on your 16KZX81 

NOW AVAILABLE 

2 Quizzes per cassette 

issue 1 1 "General Knowledge" $5.00 each 

issue 1 1 Movie Trivia" $6.00 each 

Issue 1.1 "Sports Trivia" $6.00 each 

Send Check or Money Order to 

SCI 

Box 553 

Mechanicsville. Virginia 23111 

Virginia Residents add 4% sales tax 

Overseas orders add $1 00 



ZX81 VIDEO INVERTER ADDS PROFES- 
SIONAL TOUCH 
NO MORE EYE-STRAIN 
DISPLAY SHARP WHITE CHARACTERS 
ON SOLID BLACK BACKGROUND TV 
SCREEN 

A TOGGLE SWITCH LETS YOU CHOOSE 
BETWEEN NORMAL AND REVERSE 
THE SMALL PRINTED CIRCUIT BOARD 
FITS INSIDE YOUR ZX81 
ALL FULLY TESTED WITH CONCISE 
INSTRUCTIONS 
MONEY BACK GUARANTEE 
AVAILABLE AS KIT £5 / $10 
READY BUILT £6 50 / S 13 
PRICES INCLUDE AIRMAIL SEND £ OR S 
CHECK. 
D FRITSCH 
6 STANTON ROAD 
THELWALL 
WARRINGTON 
CHESHIRE 
WA4 2HS 
UK 



Resources, continued 



tire "communities" are set up. 
Machine code for fast action. 8K 
ROM; 16K RAM. Cassette and man- 
ual: $8.95; manual only: $5.00. 

Harthun Engineering and Research 

PO Box 1 1 1 

Albany, KY 42602 

Program "CWSS". Split screen CW 
Transceive Program. Received CW is 
printed on the top 10 lines of the 
screen; the transmit display, the bot- 
tom 10 lines; the two halves scroll in- 
dependently; will copy CW up to 
about 40 wpm. Cassette: $10 pp. I/O 
interface required; 2 board etched cir- 
cuit board set for the interface: $ 1 2 pp. 

Cliff Nunnery, NU4V 

313 Vaugh St. 

Fort Walton Beach, FL 32548 



Publications 

• Time/Sine Directory. Lists Timex, Sin- 
clair users and user groups in your 
area. For two issues (early 1983 and 
mid- 1983) send $2.00 and 2 long 
SASEs to: 

Time/Sine Directory 
PO Box 23170 
Milwaukee, WI 53223 

• ZX Source List. An up-to-date listing 
of over 165 supplies of hardware, soft- 
ware, books, and users groups in the 
U.S. and Canada. $3.00. 

G. E. Topp 
PO Box 388 
Klamath, CA 95548 

• SYNC-hronizing Education and 
Games. Vol. 1, no. 1, now available. 
Programs include: Shoot the Teacher, 
Artist 2, Warship, and Attack. Fea- 
tures articles and tips. Yearly 
subscription (16 programs): U.S., 
$7.00; Canada, $8.00. 

SYNC-hronizing Education and 

Games 
Henry Svec 
668 Sherene Terrace 
London, Ontario 
Canada N6H 3K1 



• QZX. The journal covering amateur 
radio and Sinclair computers (ZX80, 
MicroAce, ZX81, and Timex/Sinclair 
1000) is continuing publication with 
Alex F. Burr, K5XY, as publisher and 
Ambrose "Bo" Barry, W4GHV/5, as 
editor. The new address is: 

2025 O'Donnell Dr. 
Las Cruces, NM 88001 

• The DATAmerica ZX-lndex. A 
sourcebook of software, hardware, 
publications, services, and users 
groups for the ZX80, ZX81, 
MicroAce, T/S 1000, and Spectrum 
computers. If you are interested in 
listing anything, contact: 

The DATAmerica Computer 

Users Group 
312 E. 84th St., la 
New York, NY 10028 

• A Directory of software and hardware 
suppliers being compiled for distribu- 
tion in the U.S. and West Germany. 
Suppliers are invited to send informa- 
tion about products and books for 
inclusion to: 

Walter Gampper 
Zollamtstrasse 50 
675 Kaiserslautern 
West Germany 

RAM Expansion 

• 16K RAM pack for the ZX81. Injec- 
tion molded plastic case; overcomes 
wobble and disconnection problems 
characteristic of other units; optional 
extra is a keyboard sounder giving au- 
dible feedback when a key is pressed. 
RAM pack: $19.95; RAM pack and 
sounder: $24.95. 

Ground Control 
Alfreda Ave. 

Hullbridge, Essex SS5 6LT 
United Kingdom 

• ZX81 2K upgrade. Kit including 
instructions and IC socket: $14. Send 
$24 and your ZX81, and have your up- 
grade done for you. 

Micro Basics 
5768 Albans Circle 
Lithonia, GA 30058 

• Expand your ZX81 IK to 16K or 16K 
to 32K for unde $30. Fits inside yoru 
ZX81. Plans: $5. SASE for list of 
peripherals. 

T. W. Cook 
MACS-24 MCAF 
Quantico, VA 22134 
(703)640-3188 

SYNC Magazine 



• Organic Micro. A collection of mod- 
ules to expand the ZX81 with the 
capability of reconfiguration to form 
an upgraded system in the future. 
Modules available: Persona — an inter- 
face to enable an Organic Micro to 
Grow on the ZX81 (£24.95); Mini- 
map — a memory mapping device to 
extend the address space of the ZX8 1 
from 64K to 1M (£29.95); RAM 
08— expands RAM from 2K. to 8K 
(£19.95); RAM 16— 16K RAM add-on 
(£21.95); RAM 64— 64K RAM add- 
on (£64.95); Toolkit — a module to take 
up to 8K of utilities in EPROM/ROM 
(£17.95); DROM (£32.95); Pericon a 
(£22.95), b (£27.95), and c (£34.95) 
— I/O modules; Userfont — user de- 
finable characters for RAM 08, 
DROM, and Toolkit (£6.95). 

BASICare Microsystem Ltd. 

5 Dryden Ct. 

London SE 11 4NH 

United Kingdom 
01-735-6408 



Joysticks 



• Add a joystick to your 8K ROM 
ZX80. Hooks up in minutes. Plans and 
parts (does not include Atari type joy- 



stick): $6. Specify your machine. 
Ron Howard 
1 Ridgelan, Apt. 5 
Florissant, MO 63031 

• Hook up your own Atari joystick to 
your ZX81. Accessed through basic or 
machine code; examples given. Com- 
plete kit; a little soldering: $39. 

Chris Taraba 
Box 394 

Goderich, Ontario 
Canada N7A 3Y5 

EPROM 

• I/P Nonvolatile Memory EPROM 
Programmer. New ZX81 plug on 
module has 6 I/O prots and 4 sockets 
for 2K memories; static RAM or 2716 
EPROM may be used; save USR pro- 
gram in EPROM for ready access or 
use static RAMs. Kit: $79; assembled 
and tested: $99. Low cost EPROM 
programmer for 2716 EPROM. Inter- 
faces to ZX81 through 3 parallel ports; 
includes software to program or copy 
EPROM. Assembled and tested: $79. 

Wisconsin Electronics 
PO Box 332 
Milton, WI 53563 



Program Collections 

• ZX81 Programs. Tape (3) Business; 
Tape (5) Quiz; Tape (1) Games; Tape 
(4) Investment; Tape (6) General; 
Tape (2) Diet. 8 programs per tape. 
8K ROM; IK RAM. Cassette: $8 
each. 

Roman Software 
788 Mercury Circle 
Littleton, CO 80124 

• Programs for the ZX81 or T/S 1000. 
Games, business, household, educa- 
tion, graphics, and other general items. 
For free catalog send SASE to: 

ZXAD Software Unlimited 
404 Edgewood Dr. 
Exton, PA 19341 

Printers & Supplies 

• Paper rolls for the ZX printer now 
available in the U.S. by mail. Electro- 
sensitive paper with a whiter back- 
ground for superior contrast and 
legibility. 3 rolls: $12 postpaid. 

E. Alvarez 
PO Box 1025 
Oviedo, FL 32765 



TIMEX and SINCLAIR FORGOT! 

Here's 

ADD-A-SWITCH 

Power switch forTimex 1000 and Sinclair ZX-81 




• Installs instantly- no 
computer modification 

• Eliminates plug & jack 
damage 

• Saves hassle - no loose 
cords in work area 

• Protects your computing 
equipment 



Mail to: Lyon Ware, 1 520 S. Lyon, Santa Ana, CA 92705 
Please send me the ADD-A-SWITCH for $14.95 ea. 

□ Check □ Visa □ Master Charge 

Signature 

Card No. Exp. 

Name 

Street 

City 



State 



Zip 



Calif, residents add 6% sales tax. Visa, MC add $2 handling. 

Lyon Ware is an affiliate of Development Associates 



ZX-FORTH 



Now you can have the SPEED and POWER of comput- 
ers costing hundreds or even thousands of dollars more 
inside your ZX81. FORTH is now available on cassette 
for the 1 6K ZX81 /TS1 000. EASIER to learn than BASIC 
and the most powerful language available for the ZX81 
10 TO 20 times FASTER than BASIC and typically uses 
less than HALF the amount of RAM space needed by an 
average BASIC program. Includes extentions for speedy 
graphics handling, as well as basic data handling func- 
tions. Sample programs written in FORTH included at no 
extra charge are: Scratchpad, a simple word processor, 
and Breakforth. an arcade-type game. Also included is a 
complete bibliography and information about fig- 
FORTH, the international FORTH users group. 

Find out why FORTH is gaining worldwide support as the 
state of the software art and have fun learning about 
computers the fast and easy way. 

THE FOURTH DIMENSION 
1451 N.UNION STREET 
MIDDLETOWN, PA 17057 

ZX-FORTH& 16K CASSETTE $34.95 

Add $2.00 shipping and handling. 

Add $7.00 shipping and handling for foreign orders. 



November /December 1982 



119 



Resources, continued 



Business/Household Programs 



• Z-Wryter Word Processor. Allows 
user to write, edit, and save text on 
cassette; edit functions to modifify 
pages, lines, or individual characters. 
8K ROM; 16K RAM. Cassette and 
instructions: $9.95 plus $1 s&h per 
order. 

RCO Technical 

PO Box 773 

St. Ann, MO 63074 

• Universal Inventory File. Files created 
by menu and prompts; 2 ways to 
search; start new files, add, delete, 
check, and more. 8K ROM; 16K 
RAM. Cassette & manual, $16.95 
postpaid. 

• U.S. Savings Bonds. List the series, is- 
sue date, serial number, and de- 
nomination for 25 bonds; add or delete 
bonds, make changes, increase or de- 
crease number listed. 8K ROM; 16k 
RAM. Source list and instructions: 
$2.50 check or money order. 

John B. Carson, Jr. 

11200 Lockwood Dr., No. 307 

Silver Springs, MD 20901 



• Compu-Stat. Calculates most descrip- 
tive statistics, graphs frequency dis- 
tribution; menu driven; manual gives 
step-by-step explanations. Cassette and 
manual: $9.95. 

Computercraft 
156 Drakes Ln. 
Summertown, TN 38483 

• 7 programs for the 1982 tax return. 
Data is interactively entered, exam- 
ined, modified; results seen immedi- 
ately; forms can be printed and/or 
saved on tape for future use; Form 
1040 and Schedules A, B, C, C1/C2, 
D, and E are featured. Available in 
January 1983. $14 (cost is deductible). 

KSOFT 

845 Wellner Rd. 

Naperville, IL 60540 

• Universal Inventory File. $16.95 plus 
$1.50 s&h. Universal Mailing List. 
$10.95 plus $1.50 s&h. (New Jersey- 
residents add 5% tax.) 

M. C. Hoffman Company 
POBox 117 
Oakland, NJ 07436 



• ZX Data Finder. High capacity file 
manager; versatile catalog/index/ref- 
erence tool; edit, search, and display 
routines explained in text; a course on 
file and data storage techniques. List- 
ing and documentation: $9.95. Data 
sheets on program capabilities are free. 

Thomas B. Woods 
PO Box 64 
Jefferson, NH 03583 

• The Diggles Kitchen. A series of cas- 
settes to build up a world wide cookery 
book using the recipes of John and An- 
gela Diggle. 3 vols, available now: 
World-wide Cookery, European Cook- 
ery, Everyday Family Meals. 2 vols, 
coming: Chinese and Indian. Prompts 
the user at each stage. 32K of pro- 
gram; about 28 recipes per tape. $9.99 
plus $2 s&h. 

Micro Computer Software 
Unit D6, Pear Industrial Estate 
Stockport Rd., Lower Bredbury 
Stockport SK6 2BP 
United Kingdom 

061-494-2441 S 



Aid Electronics 58 

Aadvark Technical 38 

Abacus Electronics 86 

Abersoft 84 

Active Designs 63 

Acts Audio..... 68 

Advanced Interface Designs 91 

Aerco 6 

Apropos Technology 57 

Anderson Engineering 1 16 

Aeries Association 104 

Atto-Soft 110 

Audiograph 66 

BASCO 116 

Basically Software 85 

Bob Berch 4, 50 

Biocal Software 45 

Bi-Pak 72 

Bug Byte 1 1 

Byte Back Co 12 

C-20 Magazine 53 

C.A.I. Instruments 31 

C.E.D. Corp 47 

Cases 86 

Circle Chess 58 

Clcva Computer Ware 20 

Cole Consultants 89 

Compu-Tech and Software 40 

Computer Continuum 1 13 

Computer Engineering Service 54 

Computer Software Marketing 1 18 

Compulhink 71 

Cook Labs 21 

Cosmonics 107 

DA Datasystems 85 

DK Tronics 7 

DSBC 67 

Daedalus Software 70 

Dallas Development Systems 90 

Dancer 58 

Data Asscttc 14,15 

Development Association (Lyon Ware) 119 

Diggles Kitchen Micro Computer Software 95 

Double H 83 

Down East Computers. 108 

Driver Software 43 

E-Z Key 13 

Edson Electronics 118 

Electronic Tech. Today, Inc 1 10 

Ephcmcris V 57 

Evansoft 58.1 16 

Expense Cutter 52 , 

Ezra Group II 89 



Index to Advertisers 

Florida Creations 108 

Fourth Dimension, The 119 

Fresh Tracks 45 

D. Fritsch 118 

Frog Software 1 17 

Fuller Micro 24 

Peter Furlong Products 4 

General Systems Consulting 57 

Gibbons. J. P 91 

Gladstone Electronics 60,61 

Gotwald 81 

Haymarket Software 16, 67 

Heath Computer Service 8 

Hilderbay Ltd 81 

M.C. Hoffman 58, 68 

Hunter 1 1 1 

Hurricane Electronics 106 

Independence Research 104 

Infinity Research 78 

Intercomputer 84 

International Publishing 69 

JK Audio 46 

JRS Software 28,63 

Jenn Products 101 

K Soft 70 

KML Incorporated 35 

Kayde Electronic Systems 23 

King Software 58 

Kopak Creations Inc 33 

L & G Enterprises 1 17 

Lamo Lem 44 

Leading Edge Cover 4 

Luxtron Inc 92 

M.C. Associates 56 

Maples, William 70 

Melbourne House 49 

Memory Master 84 

Memotech 2 

Micro-80 83 

Micro Computers Plus 64 

Micro Design Concepts 109 

Microsync 1 

Micro Tech 4S 

Mikro-Gcn 71 

Mindwarc 5 

Mohr & Associates 77 

Namal Associates 34, 63 

Nimrod 45 

Nirad 90 

Non-Trivial Solutions 10 

Nooter Stock Program 101 

Omni Technology 94 

Orbyte Software Cover 3 



Orions's Belt, Enterprises 77 

Oxford 99 

P & B Software 50 

Panda Software 105 

Peak 83 

Pecos Star Co 109 

Personal Software 24 

Photo Lab 58 

Powcrplay Systems 93 

Powertronix 50 

Professional Electronics 54 

Research Applications Products 57 

Robill Products 55, 93 

Rom Pac Applications Cover 2 

Romark 51 

Michael Rossa 116 

Run-It Software 47 

S.C.I 118 

Santa Fe Industries 45 

Savage Software 45. 116 

Servitronics 107 

Sinclair Place 75 

Sinware 42 

Siriuswarc 55 

Small Systems Software 93 

Smartware 47 

Softsync Inc 18 

The Software Farm 94 

Southern Computer Systems 37 

Space Breaker 54 

Strategem Cybernetics 1 13 

Synchronize 17 

Syncware 22 

Synergistic Design 9 

Thurnall 89 

Time Data 77 

Time Works. Inc 108 

Troiano Software 45 

Turner, Elcy and Com 76 

Ventamatic Micrc-Informatica 84 

L'psystems 66 

Chris White 35 

Woods, Thomas 1 16 

Yagsec 78 

York 10 86 

2 Ware 92 

Zebra X-ray Software 77 

Zodex 16 

Zopf Industries 50 

Zor Khan Industries 51 

ZX81 Programs 1 16 

Z X Panding Ltd .' 13 

Z-Wcst 67 



FOR YOUR 

TIMEX/SINCLAIR 1000 





1 ■ 1 ■ 

Ml 1 1 


1 - 





Welcome to the world of Mego Mind. 

An intense bottle of wit ond logic that 

challenges the human player to dive deep 

into his powers of concentration. 

Compete with the Mega Mind across your 

mind's universe to break the secret code. 

Five levels of ploy. 




(AISOCOMPATIIHI WIIM/XBt) 

i in machine code. 16K. H°.v5 



FREE POSTER WITH ORDER 



, ^ ■.,.,„< in Ilk ftwcli ' 



«^_J 



SOFTWARE 

THECIUATIVl IORCI ,M 

P O Oox 948 Depi. S. Watcrbuiy. CT 06720 
Phono. J03 ;m»oo» 

Send for free catalogue for 0101* editing software. 



THE PROWRITER COMETH. 




(Audit Cometh On Like Gangbusters.l 

Evolution. 

It's inevitable. An eternal 
verity. 

Just when you think you've 
got it knocked, and you're 
resting on your laurels, some- 
body comes along and makes 
a dinosaur out of you. 

Witness what happened to 
the Centronics printer when 
the Epson MX-80 came alone 
in 1981. 6 

And now, witness what's 
happening to the MX-80 as 
the Pro Writer cometh to be 
the foremost printer of the 
decade. 
SPEED 

MX-80: 80 cps, for 46 full lines 
per minute throughput 
PROWRITER: 120 cps. for 
63 full lines per minute 
throughput. 
GRAPHICS 

MX-80: Block graphics standard, 
fine for things like bar graphs 
PROWRITER: High-resolu 
tion graphics features, fine 
for bar graphs, smooth curves 
thin lines, intricate details etc 
PRINTING 

MX-80: Dot matrix business 
quality. 

PROWRITER: Dot matrix 
correspondence quality, with 
incremental printing capability 
standard. 
FEED 

MX-80: Tractor feed standard- 
optional friction-feed kit for 
about $75 extra. 
PROWRITER: Both tractor 
and friction feed standard 
INTERFACE 
MX-80: Parallel interface 
standard; optional serial 
interface for about $75 extra 
PROWRITER Available stan- 
dard-either parallel interface 
or parallel/serial interface 
WARRANTY 
MX-80: 90 days, from Epson 
PROWRITER: One full year ' 
from Leading Edge 
PRICE S 

Heh. heh. 

Marketed Exclusively by Leading 
Edge Products, Inc.. 225 Turnpike 
Street. Canton. Massachusetts 
02021. Call: toll-free 1-800-343-6833- 
or in Massachusetts call collect 
16171828-8150. Telex 951-624 

LEADING 
EDGE. 

For a free poster of "Ace " 
/Prownter s pilot/ doing his thing, 
please write us.